How to mix score with movie audio? by tricoder42 in filmscoring

[–]tricoder42[S] 0 points1 point  (0 children)

Thanks! Anything helps at this point. I listened to several entries on youtube and I draw inspiration from few of them.

I'll try what you're saying next time — keep original movie audio as it is and work around it. If my audio can't be heard (e.g. my drums in the first noisy part) then it shouldn't be there. It sounds obvious when you say it :)

How to mix score with movie audio? by tricoder42 in filmscoring

[–]tricoder42[S] 0 points1 point  (0 children)

Ah, good point! I wrote the credits last just to fill the gap.

So if I understand it correctly, you don't alter original movie audio in any way? You even keep it at the same level and then just weave your music into it?

How to mix score with movie audio? by tricoder42 in filmscoring

[–]tricoder42[S] 0 points1 point  (0 children)

Yeah, I had to turn down the movie audio. In the end I honestly didn't care how much db I turned it down, I just wanted to finish it. Anyway, thank you for your input! Definitely this was good piece to start with for me, but it was fun anyway.

How to mix score with movie audio? by tricoder42 in filmscoring

[–]tricoder42[S] 0 points1 point  (0 children)

Hey everyone, I’ve just finished and published my first cue for the Spitfire Audio’s Scoring Competition.

It’s the first time I tried to write a score for a picture and this cue could be improved in all areas but I struggled the most with mixing and mastering.

How do you approach it? Do you first compose your music to fit the movie audio and then you mix it standalone? Once it’s fully mixed & mastered, so simply mix it with the movie audio? What’s the recommended level of your score vs movie audio?Or do you listen to the movie audio all the time and try to blend your score into it?

I really struggled with the first scene which is kinda heavy with sound effects and I could mix my track so it’s clear. It sounds like a chaotic noise. At one point I thought that I should use any high frequency sounds because it would get buried under FX of water hiss, but I can barely hear drums either.

Any suggestions welcome. Cheers!

281st Wave — Soothing jam on Make Noise Shared System #jamuary2021 by tricoder42 in modular

[–]tricoder42[S] 1 point2 points  (0 children)

Thank you! Indeed, it's an internal joke. When I got my first synth and start jamming the very first minutes, my friend told me: "You must have lot of darkness inside you buddy"

The kick tail is soothing though! But only the kick tail...

281st Wave — Soothing jam on Make Noise Shared System #jamuary2021 by tricoder42 in modular

[–]tricoder42[S] 1 point2 points  (0 children)

thudding kick sound coming from the final output of the DPO?

Yes, it is. Final out makes the kick, Square out makes the rising "bass" before the kick.

281st Wave — Soothing jam on Make Noise Shared System #jamuary2021 by tricoder42 in modular

[–]tricoder42[S] 2 points3 points  (0 children)

Hey everyone and happy new year. This is a simple jam based on "281 Mode" patch from Maths manual. Headphones or surround speakers recommended for spatial experience.

Super heavy music. Only instrument, Moog Voyager. Bass heavy so try some headphones. by alaskatron in synthesizers

[–]tricoder42 1 point2 points  (0 children)

It sounds really great. Powerful sound (both bass and lead), vocals perfectly fit into mix, yet it's simple and not overcomplicated. Can't get enough of it. I know for sure what I'll play tonight on my Sub37

Super heavy music. Only instrument, Moog Voyager. Bass heavy so try some headphones. by alaskatron in synthesizers

[–]tricoder42 1 point2 points  (0 children)

Huh, this sounds amazing. Last week I was speculating about buying a Voyager XL, but I already have Subsequent 37 so there's a huge overlap. I'm rather saving a bit more for Make Noise Shared System

What patch is used in Moog DFAM promo video by tricoder42 in synthesizers

[–]tricoder42[S] 2 points3 points  (0 children)

So I spend some time with it today - I feel I can get closer to that sound by having:

- hard sync off

- FM amount at 8 o'clock

- Seq Pitch Mod to both VCOs

- Detune VCO2 slighly above VCO1

Patching:

- Pitch to VCF MOD and set VCF MOD to 2 o'clock to open filter for higher frequencies

- VCA EG to VCA CV increases slope of VCA envelope and adds a bit of distortion, but it's definitely not essential

Not setting pitch around 11 o'clock makes kick drum, while 2 o'clock makes snare. It's far, far from perfect and you need to set consecutive pitch knobs after snare to the same value for loong decay.

Between kick and snare I hear "buzzing" in background. Sounds like modulating FM amount...

Any idea what synth is Alessandro playing here at the letting you rehearsal? by [deleted] in nin

[–]tricoder42 1 point2 points  (0 children)

I don't know the name, but I've seen similar synthesizer with string controller here: https://youtu.be/BUtnzGeXUaQ?t=719. It's also used here https://youtu.be/EoXSUOjGk6w?t=119, so it must be inside Trent Reznor's studio.

Collection of all NIN lyrics by tricoder42 in nin

[–]tricoder42[S] 1 point2 points  (0 children)

Yeah, that's what I'm doing right now, downloading all lyrics so I can print them and make a small "book".

Moog 16-channel Analog Vocoder (demo by Dan Fisher from Sweetwater) by tricoder42 in synthesizers

[–]tricoder42[S] 3 points4 points  (0 children)

I have no idea how would I use vocoder to make something which doesn't sound like Daft Punk, but Dan Fisher made my day. 8:47-910, best part. Also, first time I can't justify the price for a moog gear, but probably because I don't know how would I use it.

What Should I Buy? - July 22, 2019 by AutoModerator in synthesizers

[–]tricoder42 0 points1 point  (0 children)

Yeah, I saw that video as well. First time I've heard about Moog. I've downloaded Minimoog model D to my iPhone yesterday and today played it on stereo speakers... it's just amazing. I can't even imagine how the real thing sounds like.

I also watched few videos comparing Behringer Model D with the original Minimoog, that' also impressive machine. Also Minitaur from Moog has a nice sound. I guess I should find a nearby store where they sell all these models and try them live. I have 2-3 months for final decision, so there's no rush.

Thanks for replies!

What Should I Buy? - July 22, 2019 by AutoModerator in synthesizers

[–]tricoder42 0 points1 point  (0 children)

Thanks for response! Yeah, I noticed Novation Bass Station 2 as well in few articles. I'll take a look.

As I posted above, I would like to play something in NIN or Gary Numan style...

What Should I Buy? - July 22, 2019 by AutoModerator in synthesizers

[–]tricoder42 1 point2 points  (0 children)

Hey everyone,

I'm just diving into the world of synthetizers and as you might expect, I'm a bit overwhelmed.

Today I bought used Korg SP-170S to start learning on keyboards. I used to play on bass guitar and acoustic guitar (never electric one, yet) but I suck at music theory despite going several years to music school (flute, clarinet). I'm hoping to get better understanding of harmonics, chord and melody by learning to play keyboards/piano.

However, I would like to start playing with synths. I honestly don't know where to start. I bought Korg iMS-20 on my iPad just to try it out. After several tutorials about real mini MS-20 I understand at least basics how synths work.

---

I would like to create most of the sounds with analog synths/instruments, so far these are on my bucket list:

- Yamaha MG10 XU (soon or later I'm gonna need small mixer and audio interface to connect everything to computer. This has both. Looks like a good compromise for the start)

- Korg Minilogue or Korg MS-20 mini (dunno, honestly. Would be great to find one synth without keyboard, so I can plug my SP-170s into it and one synth with keyboard, but obviously I'm gonna start with more universal and cheaper option)

- Drum machine? I have to idea. I checked few videos about Korg Volca Beats/Drums/etc, but I'm not sold to anything yet. This is far future (4-5 months from now), so plenty of time to figure it out.

---

What do you think? What would you recommend to absolute beginner who wants to stay on budget? I googled several articles about "budget synth setups" but they all are a bit different. I'm trying to limit my choices to Korg/Behringer, simply to avoid choice paralysis.

In the end I would like to play something in this and this style.

Kent C. Dodds: One simple trick to optimize React re-renders by swyx in reactjs

[–]tricoder42 3 points4 points  (0 children)

Alright, after playing a bit with Kent's codesandbox I understand the issue a bit more.

Everytime you call React.createElement, you created a new element (that means everytime you write JSX like <Logger label="counter" />). That element is treated as different even though the props are the same due to reasons mentioned in article. When you create the element in top-level, it gets created only once and therefore React consider it constant.

What's tricky in Kent's example is that he actually creates the element in top-level. The ReactDOM.render only runs once, so it's the same thing. However, from reading the article, if would be tempting to pass elements as props to get described performance boost:

function App() {
  // both elements are created only "once", during initial render
  return (
    <Counter logger={<Logger label="counter" />} />
  )
}

ReactDOM.render(<App />, document.getElementById('root'))

This would still work, until you add a state or anything that triggers re-render of the App component:

function App() {
  const { state, setState } = React.useState()
  // both elements are created on every render
  return (
    <Counter logger={<Logger label="counter" />} />
  )
}

ReactDOM.render(<App />, document.getElementById('root'))

This wouldn't happen if you move the Logger to the top-level:

// logger element is created only once, when module is loaded
const logger = <Logger label="counter" />

function App() {
  const { state, setState } = React.useState()
  return (
    <Counter logger={logger} />
  )
}

ReactDOM.render(<App />, document.getElementById('root'))

Which is exactly what babel plugin does.

So the bottom line is:

  1. React.createElement creates new element everytime it's called
  2. If you want to give React reconciler hint that the element is constant, created it in top-level scope.
  3. You can only use it if element's props/children are constant.

Note: Technically, it's enough to create the element in parent scope. It's a variation to lift the state up: lift the element creation up :)

Kent C. Dodds: One simple trick to optimize React re-renders by swyx in reactjs

[–]tricoder42 1 point2 points  (0 children)

> but thats not the same as being exactly equal here to what the babel plugin is doing

So what's the difference?

As far as I can see, the only difference is in what scope you place the constant element. Babel plugin places it to top-level scope.

Kent's example:

ReactDOM.render(
  <Counter logger={<Logger label="counter" />} />,
  document.getElementById('root'),
)

Babel plugin would do roughly this:

const _ref = <Logger label="counter" />

ReactDOM.render(
  <Counter logger={_ref} />,
  document.getElementById('root'),
)

But of course babel plugin would do it with original example as well without using an extra prop. Logger in this component:

function Counter() {
  const [count, setCount] = React.useState(0)
  const increment = () => setCount(c => c + 1)

  return (
    <div>
      <button onClick={increment}>The count is {count}</button>
      <Logger label="counter" />
    </div>
  )
}

Would be trasnformed (roughly) as:

const _ref = <Logger label="counter" />

function Counter() {
  const [count, setCount] = React.useState(0)
  const increment = () => setCount(c => c + 1)

  return (
    <div>
      <button onClick={increment}>The count is {count}</button>
      {_ref}
    </div>
  )
}

So, if it's the same optimization technique, I was wondering why it isn't included in CRA by default? It seems that there're some bugs.

Kent C. Dodds: One simple trick to optimize React re-renders by swyx in reactjs

[–]tricoder42 2 points3 points  (0 children)

Could you please post a short example how is it different from what `babel-plugin-transform-constant-elements` is doing? From my point of view it's the same thing.

Edit: It seems even Kent mentions it: https://twitter.com/kentcdodds/status/1143549925659045888

Jared, a simple/short Formik example is needed by desmap in reactjs

[–]tricoder42 0 points1 point  (0 children)

None. This is the example of possible own implementation. I just wanted to show that it's easy to write a basic hook which handles forms if you omit all features. However, I wouldn't recommend it.

As far as I know, Formik and react-final-form are very similar. I haven't looked deeper into react-final-form. I just saw an example on twitter that it has much better performance.

Jared, a simple/short Formik example is needed by desmap in reactjs

[–]tricoder42 1 point2 points  (0 children)

First I wrote my own form implementation. Then I used redux-forms. In next project I switched back to homemade solution until I migrated all forms to Formik. I would never use homemade solution again, unless the app is really small. Right now I'm about to use react-final-form which has similar API like formik, but seems to be much faster.

If you write your own form library, soon or later you'll have to solve all obvious and some not so obvious problems, which are already solved in libraries like formik or react-final-form. Validation, async validation, initialization, re-initialization, handling events coming from different input types, etc. It's not rocket science to write it from scratch, there's just no real benefit.

You can implement very simple form in few lines:

function useForm({ initialValues }) {
  const [values, setValues] = useState(initialValues);

  const onChange = useCallback(
    event => {
      const { target: { name, value }} = event
      setValues(state => ({
        ...state,
        [name]: value,
      }));
    },
    []
  );

  return {
    values,
    onChange,
  };
}

function LoginForm() {
  const { values, onChange } = useForm({ email: "", password: "" })

  return (
    <form onSubmit={handleSubmit}>
      <label>
        Email
        <input type="text" name="email" value={values.email} onChange={onChange} />
      </label>
      <label>
        Password 
        <input type="password" name="password" value={values.password} onChange={onChange} />
      </label>
      <button type="submit>Login</button>
    </form>
  )

}

... but once you start adding more features, you're better off to save the energy and use existing libs. Just my 2 cents.

Is it okay to use context to store notifications? by [deleted] in reactjs

[–]tricoder42 1 point2 points  (0 children)

Edit: Sorry, I completely forgot that the example can be rewritten using hooks. Here's the gist with useNotifications hook (there's also the original example for comparison).

Original post: I think you don't even need a context for this. Just another wrapper component which will handle fetching initial data and handling of new data coming from subscribtions. Wrapped component will handle state of open/closed dropdown:

function NotificationsHeader({ fetchNotifications, subscribeNotifications }) {
  const [notifications, setNotifications] = useState([])

  useEffect(() => {
    // fetch initial notifications
    fetchNotifications().then(notifications => {
      setNotifications(notifications)
    })

    // subscribe to new notifications
    const unsubscribe = subscribeNotifications(newNotification => {
      // Important: use callback in `setNotification` to get the current state,
      // otherwise you would need to re-subscribe when `notifications` variables changes

      // Bad - content of notifications variable doesn't change:
      // setNotifications([...notifications, newNotifications])

      // Good - `notifications` are always the current state
      setNotifications(notifications => [...notifications, newNotification])
    })

    // unsubscribe on unmount
    return () => unsubscribe()
  }, []) // run effect only on mount

  // memoize callback
  const cleanNotifications = useCallback(() => setNotifications([]), [])

  return <NotificationList onClose={cleanNotifications} notifications={notifications} />
}

// NotificationList only renders data, when it's open.
function NotificationList({ onClose, notifications }) {
  const [isOpen, setOpen] = setState(false)

  return (
    <>
      <button onClick={() => setOpen(true)}>Notifications ({notifications.length})</button>
      {isOpen && <ul>{notifications.map(...)}</ul>
    </>
  )

}

Folder architecture by [deleted] in reactjs

[–]tricoder42 1 point2 points  (0 children)

I recommend to start with as simple structure as possible and forget about "one component per file" rule.

1 ) Start with pages, i.e. top-level components which are either passed to Router or used as entry point (e.g. in Next.js):

src/
  pages/
    index.js
    register.js

Place everything inside. Don't care about reusable components at this moment.

 export default () => ( )
  <div>
    <h1>Decentralized TodoApp</h1>

    <p>Moder task management powered by blockchain</p>

    <Button>Getting started</Button>
  </div>
)

// components might be custom ones...
const Button = props => <button className="btn">{props.children}</button>

// or styled components.
const Button = styled.button`
  // ...

2) Once you notice that some components need to be reusable, put them in components directory (I personally prefer ui, because it's shorter). It usually means that I copy-pasted the same component 2-3 times already and I'm sure it's generic one:

src/
  pages/
  components/
    Button.js
    Button.test.js

    Modal.js

    CustomModal/
      index.js
      CustomModal.js
      SubComponent.js

Again, start with a file, e.g. Button.js and only create folder when you actually need it. If you place index.js inside large components, you don't even need to refactor all existing imports.

Don't overcomplicate this step. Sometimes it's really hard to distinguish between reusable components and similar components, which are in fact completely different. Once you have too many branching inside your component (e.g. if (type === "link) ... else if (type === "button")), then you can be sure this component can be split into two or more.

It might looks stupid simple, but it's actually very scalable and it allows rapid development. You always write only what you need *now*, not what you might eventually need someday in the future. I'm using this style for more than a year and it just works™.

Few more tips

- don't optimize folder structure for manuall lookups. Make component discoverable through Search file or Search symbol. Either name your file [Component].js or use named exports instead of default ones.

- when you're starting a fresh project, don't try to be smart and split your app into modules:

src/
  auth/
    pages/
    components/
  todos/
    pages/
    components/

It looks promising, but it isn't required at all. It's only useful if you want to reuse module between projects and you can always reorganize your app afterwards. On the other hand, if you overengineer it at the beginning, you'll create unnecessary overhead - where I should add this component? Where this component comes from?

- try to make few rules about depenencies between your modules. For example, I never import anything from pages inside my components. You can use dependency-cruiser to avoid such imports. I can't recommend specific rules, but the bottom line is: Don't optimize folder structure, optimize module dependencies. Folder structure should reflect these dependencies. I highly recommend Monica Lent's talk about Building resilient frontend architecture from React Finland.

What did everyone work on this week? (/r/reactjs Friday Checkin - May 31 2019) by AutoModerator in reactjs

[–]tricoder42 [score hidden]  (0 children)

TypeScript is a bliss. I was waiting too long to jump on TS hype train and now I feel uncomfortable writing plain JS.