SynthMaker

Anyway to have a code with float array out ?

Archive · 2012 5 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

Chaoslala ·

Everything in the title. I suppose it's impossible, but who know..

cyto ·

It is certainly possible. I, personally, know of three ways to achieve it, but two of them are rather "advanced" and the other is not very flexible. The easy way is to use the Signal Analyzer to grab an array from the code output. The downside of this is that the code (I think) can only be used to generate the array. In other words, since it depends an a poly impulse to generate, it cannot be integrated with the rest of your signal path. That's the non-flexible method.

Another method is to create a memory buffer in you code that contains the values of the array that you wish to export and write a routine that continually "cycles through" a reading of that buffer and exports the values to a "mono to graph" primitive. The trick with this method is the mono to graph primitives are "synced" to the ASIO buffer size of the user and in order to "line up" the array, you must somehow determine that value and adjust your "read" routine accordingly. This is pretty tricky but there are ways to do it.

The last method involves using the "wave write" primitive (R&D) and the "memory to array" primitive. This may perhaps be the easiest to implement, but nevertheless it may not be too stable because of the R&D distinction.

So, to answer your question, Yes! But which method you choose depends on how comfortable you are working with different aspects of SM and ultimately, what exactly it is you are trying to achieve.

-cyto

Chaoslala ·

Thanks ! I will try ! I thinked about a real time aray out. Don't remember why i want one and why i prefer it real time... 😊

I made something with the Graph module. It store the value only when it change. That's an "impossible?" and little ridiculous try to make a multiple pitch detect.. Really want to make one ! But i'm far from it!

When i see the array result i could see some logic with the multiple pitch that mix together. But i don't find a way to detect them...

trogluddite ·

You are not alone, me and others have all asked for the possibility to put arrays direct into code and assembly. All three methods suggested by Cyto are very useful at times, but none of them are able to update a whole array at each sample.

However it is important to analyse how quickly the array needs to update - the times when a whole array must update at every sample are very few. - OTOH, the array is often used to make a GUI display animated at only a few times per second. In fact, for pitch analysis, "time accuracy" is impossible anyway - not because SM is limited, but because of fundamental laws of mathematics. To know if a pitch is present, one always has to analyse a short section of the sound - the section must be more than one cycle of the lowest pitch (and usually more cycles for extra accuracy). For example, to analyse music, you might need to analyse down to, say, 20Hz - in which case only 20 analyses per second can be done. So a super-fast "array fill" would serve little purpose, and one of Cyto's suggested methods would be perfectly adequate.

If you do require sample rate data changes, then sadly, the only method is lots and lots of streamins and streamout, and whatever "green" bits are needed to go wit it.

Chaoslala ·

Hé hé find a way to make a mono delay with the Graph module and the Arrmem (Float array to mem) module. The bad think is that the Graph module need a ticker to get new array. And i think it's not possible to tick at the right time.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.