justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: I do a bit of coding in JSFX (e.g. ReaRack modular synth). I would like to get a better understanding of the temporal relationship between @block and @sample. For instance, when using midireciev(), if I set a variable at a certain offset, when does that occur in @sample, at the same relative sample in the sample flow, relative to the end of the block, or no guarantee of any particular time? Further to my last question, you can put a lot of code before or after midireceiv(). Given that, I assume, midireceiv() has to listen for MIDI data for the entire block, when does the code get executed? I'm no computer scientist, be kind :)
Asked by Time Waster (Mal) (165.225.115.x) on July 14 2022, 2:12am
Reply on July 14 2022, 7:03pm:
    @block executes, followed by n=samplesblock executions of @sample. midirecv() will allow you to get each event (usually you'd want to do this in @block). There's no real signal flow relating to audio vs midi, the block is processed as a block, you midirecv/midisend to read/write midi events in that block, and use @sample to iterate over the samples (if you care about the audio!)

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS