How do I get started with Scriptnode and building synthesisers/samplers?
-
So... this is all new to me, and the documentation is pretty scant unfortunately.
So I was imagining the first thing I could do as a Hello World would be to throw in a sine-ton oscillator, and then an envelope, and I'd be able to get a polyphonic sine-tone synth that would let me set the attack and decay.
So I did that, and I notice as soon as I release a midi key, the oscillator stops producing noise. Same story with using a file player.
I kinda wasn't expecting that. A helping/guiding hand would be appreciated - are there any videos specifically targeted at building synths rather than effects?
-
@Orvillain You need an envelope node (or a table node with a ramp + midi node as trigger to create your own envelope).
Things to keep in mind:
- modulation node separates out the processing, it's like a little sandbox within your network
- always set block size for your network. wrap things in blockx nodes or if you need per-sample processing, the framex node
- some node react to MIDI. if you don't want that, wrap them into the No Midi node
- If you need math operations, use the Math.expr or Cable_expr nodes. These support the Math class from the API, and all numbers must be float/double, so no integers (just add a dot for whole numbers).
- there's no storage. you can have flow using tables which are manipulated with ramps or externally (the parameters you create can be manipulated from outside the network, either in the modulator code or from elsewhere by getting the modulator reference and calling .setAttribute()) but for anything more advanced where you need to remember data from within the network that was used in a previous block, use the SNEX node and do it in SNEX
No other way other than to play with it. Pull up every node, try it out, see what happens.
-
@aaronventure Thanks for the tips!
I figured it out. There's a workflow issue here I feel. @Christoph-Hart (I don't mean to criticise)
Empty project.
Add a ScriptNode Synthesiser to the master chain.
Go into ScriptNode, create new network.
Add file_player.
Load sample.
Play midi notes.file_player will fall silent on note offs.
But I realised that when you add the ScriptNode Synthesiser, it also adds a basic envelope to the GainModulation source in the module window.
I honestly wasn't expecting that. I was under the impression that if I add a ScriptNode, then I'm effectively telling HISE to stop holding my hand, and don't do automatic things for me, because I'm a big boy. :beaming_face_with_smiling_eyes:
Soooooooo... it isn't immediately clear to me how I should be building amp envelopes. Use the modulation source in the main module listing... or attempt to replace it in the ScriptNode??
-
@Orvillain said in How do I get started with Scriptnode and building synthesisers/samplers?:
Soooooooo... it isn't immediately clear to me how I should be building amp envelopes. Use the modulation source in the main module listing... or attempt to replace it in the ScriptNode??
I guess you can do both? They offer different things. If you want, you can do it entirely in scriptnode.
You can use the module envelope as a "Global AHDSR" and do your per-sample envelopes in scriptnode. I think that should scale as intended i.e. the module will act as a multiplier on top of any signal coming out of scriptnode.
-
This is not completely trivial because you somehow need to tell HISE at some point to stop rendering the voice so there has to be something that stops the voice. By default, it's simply the envelope that comes with the synthesiser by default. Another option is to render the envelope in scriptnode and then add a special node inside the scriptnode network and a special envelope module that picks up the voice kill message and tells HISE that the voice can be killed.
I've added a snippet to the browser that demonstrates this (Scriptnode Voice Management).
-
@Orvillain Subscribe to @d-healey's Patreon. Also, read @Christoph-Hart's introductions/explanations of HISE, scripting and ScriptNode in the documentation. Learning the right way to do things will save you much trouble later on. His discussion is concise and thorough. Lastly, look at the Snippets and tutorial projects.
-
@clevername27 said in How do I get started with Scriptnode and building synthesisers/samplers?:
@Orvillain Subscribe to @d-healey's Patreon.
I agree :)
But note I haven't done very much with scriptnode and only have one video (I think) dealing with it.
-
@clevername27 said in How do I get started with Scriptnode and building synthesisers/samplers?:
@Orvillain Subscribe to @d-healey's Patreon. Also, read @Christoph-Hart's introductions/explanations of HISE, scripting and ScriptNode in the documentation. Learning the right way to do things will save you much trouble later on. His discussion is concise and thorough. Lastly, look at the Snippets and tutorial projects.
Yeah, have read all that. Been digging into the specifics in the documentation, but sometimes it is a little lacking. Have also dug out plenty of snippets and gone through the example projects too. HISE is pretty great!
-
@Orvillain I agree with this the scriptnode documentation is slim in terms of descriptions, same with the manual. Let me know if you find any useful resources!
-
@aaronventure Sorry to necropost but i found what you had to say really helpful, so thank you! It did lead to one question however...
Would you happen to know when or why you'd want to use a specific block node (256 block, 128 block, etc.) vs blockx?
-
@ally said in How do I get started with Scriptnode and building synthesisers/samplers?:
Would you happen to know when or why you'd want to use a specific block node (256 block, 128 block, etc.) vs blockx?
Reply
No reason to do it, really.
https://docs.hise.audio/scriptnode/list/container/dynamic_blocksize.html
-
@aaronventure thanks!
-
I'm writing one geared for beginners but I've been unsure where to put it : /
-
This post is deleted! -
@griffinboy open a new thread in the Documentation subforum