Cycling74 / RNBOMetasound

RNBO adapter that implements metasound nodes
MIT License
41 stars 2 forks source link

Make Note duration seems to not retrig #27

Open Tomavatars opened 11 months ago

Tomavatars commented 11 months ago

If the duration is short, then I can hear clicks after a while. If its very long, the clicks never occurs (before I reach the duration limit). I'm using Metasound enveloppes. It seems that duration is not retrig with new notes.

https://github.com/Cycling74/RNBOMetasound/assets/14031754/7bd3c0ca-701b-46f5-a832-5100a05c7ac9

https://github.com/Cycling74/RNBOMetasound/assets/14031754/ccf128e9-1a32-45ba-b11b-53b1541de174

https://github.com/Cycling74/RNBOMetasound/assets/14031754/9ae9be6e-b244-4b4e-be2a-d8356a95a8be

x37v commented 10 months ago

@Tomavatars are you able to share the patch that you're using for this? I'm concerned with your use of external envelopes and those potentially not being timed exactly with the MIDI notes coming in

jinpavg commented 10 months ago

@Tomavatars would you also mind sending a screenshot of the whole MS graph? It would be helpful to see where the trigger that is patched to MakeNote and the trigger that initiates your audio envelope are.

Tomavatars commented 10 months ago

@Tomavatars are you able to share the patch that you're using for this? I'm concerned with your use of external envelopes and those potentially not being timed exactly with the MIDI notes coming in

Hi! I'm not very used to share Max patch, I'm a bit of a noob with some Max sharing features. Can you tell me how to share you the patch? I'll send you the file here but perhaps there's a better way to do this? FM2OP.maxpat.zip

Tomavatars commented 10 months ago

@Tomavatars would you also mind sending a screenshot of the whole MS graph? It would be helpful to see where the trigger that is patched to MakeNote and the trigger that initiates your audio envelope are.

Here you are:

CleanShot 2023-12-18 at 10 56 48 CleanShot 2023-12-18 at 10 58 16 CleanShot 2023-12-18 at 10 59 16

x37v commented 10 months ago

@Tomavatars I'm suspicious of this part of your patch

image

If the metasound envelope isn't super well timed with rnbo's notion of a note on/off, you might be getting some discontinuities there. This seems likely because you're modulating your amplitude envelope duration but not the duration of your midi notes. You could try adding some smoothing (line~) between your [receive Velocity] and the [+~] and you might benefit from filtering out 0 before you do the [/ 127]

You also might find things a little easier if you move your envelopes into your rnbo patcher, but maybe you have some additional plans with these envelopes (you could always send them out of your rnbo patcher if you need)

Tomavatars commented 10 months ago

@x37v thank you, that's useful! Actually, I wanted to use the envelop in Metasound especially for quality of life. I don't like to have a ton of inputs in a node. But if I could use arrays inputs (like I could have an adsr array) that would be cool. And also because I can also use other envelop technics directly in Metasound. What do you think of that?

x37v commented 10 months ago

I do think that handling arrays somehow would be nice, maybe inport and outport could use them in place of the list type that you get in RNBO, also I could also see using them to control exposed polyphonic parameters, I think I have that included in an issue somewhere here.

I do think that the clicking you're hearing is not coming from the RNBO work but instead from your patching so, I think it is worth closing this issue once you verify if the smoothing I've indicated resolves it.

jinpavg commented 10 months ago

captured this idea as #32

Tomavatars commented 10 months ago

I do think that handling arrays somehow would be nice, maybe inport and outport could use them in place of the list type that you get in RNBO, also I could also see using them to control exposed polyphonic parameters, I think I have that included in an issue somewhere here.

I do think that the clicking you're hearing is not coming from the RNBO work but instead from your patching so, I think it is worth closing this issue once you verify if the smoothing I've indicated resolves it.

Works like a charm, thanks! I'm still nos very used to Max, sorry for that.

Tomavatars commented 10 months ago

I still have problems with Make Note duration in another patch that doesn't work in the same fashion. Do I have a problem with my understanding of something? Here, after the first Make Note trigger, wait for the time of duration to complete, and everything is cut after that (the most interesting part is when it's 1 or 2 second duration) https://github.com/Cycling74/RNBOMetasound/assets/14031754/6433b1de-efbe-4981-9072-4f852b6c2cf5

Try with random duration, weird behavior.

https://github.com/Cycling74/RNBOMetasound/assets/14031754/d15938c4-9f38-45b7-b725-d2317bc3e853

Tomavatars commented 10 months ago

Metasound Graph CleanShot 2023-12-20 at 13 38 55 My RNBO Patch SBAMMetasound.maxpat.zip

x37v commented 10 months ago

We talked in discord and it seems like the issue is when you trigger makenote at a rate that is higher than the duration of the note and you don't change the note number, we'd expect to get a note off before a new note on but that doesn't seem to be happening. for instance, if makenote has a duration of 1s and you trigger it at 0.5s, you should effectively get 0.5s notes out, note on.. 0.5s note off then immediately another note on 0.5s note off another note on.. etc

x37v commented 10 months ago

okay, I pushed a new change to develop @Tomavatars mind giving that a go?

Tomavatars commented 10 months ago

okay, I pushed a new change to develop @Tomavatars mind giving that a go?

I'm sorry Alex, it's still not working as expected. It has an erratic behavior instead of constant cutting though.

https://github.com/Cycling74/RNBOMetasound/assets/14031754/3610d571-f673-4d46-bee6-dfc572de034c

x37v commented 9 months ago

@Tomavatars I think we identified a problem with your patch, I'm wondering if you've resolved your issue by updating your patch?

Tomavatars commented 9 months ago

@x37v the change to my patch didn't fixed the duration issue. I haven't dug in it since the start of the holidays though.