Ted21 audio view

About Monkey 2 Forums Monkey 2 Projects Ted21 audio view

This topic contains 7 replies, has 2 voices, and was last updated by  AdamStrange 2 years, 8 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3146

    AdamStrange
    Participant

    Here is a quick look at work in progress with new audio document viewer.

    I’m basically taking parts of the Wave2 audio core and graphics routines and directly putting them into Ted21.

    Currently only the base monkey2 16bit wav and ogg are supported. but I do have all the code for dealing with aiff, 12/24bit wavs, fairlight, amiga aiff, and other synth based sample loading.

    I’m also toying with the idea of bringing the entire synth subsystem over as well, along with the full sample editing systems.

    #3173

    AdamStrange
    Participant

    And the final version with everything operational.

    You can see the highlighted octave slightly darkened. the note is also shown on the piano view when pressed.

    #3204

    AdamStrange
    Participant

    Just a small update here. I’ve been into the mojo source and added the ability to see where the playhead is. I’ve also coloured the pressed key in the current selection color. Playhead is always in white with black:

    #3208

    Mark Sibly
    Keymaster

    Looks good, but what’s the source like? Is it a simple ‘drop replacement’ for the current AudioDocumentView?

    #3209

    AdamStrange
    Participant

    mmmm, That’s a really interesting question.

    You’d need to make a tiny change to mojo/audo/audio.monkey2:

    Ignoring some hard wired colors it should be good to go. I’ve done a quick comparison to the ted2 audiodocument and everything looks like it should compile – You’ll need to add the custom colors to mojo as well

    There’s a lot of repeated code – I was going to make a class to wrap it all up.

    Here’s the full source:

    #3258

    Mark Sibly
    Keymaster

    I like the ‘Playhead’ addition, will definitely add that although I think I might use ‘SampleIndex:Int’, just a bit more descriptive I think. You can apparently write to it too!

    And it’s cool that you managed to implement the whole thing by simply extending View and TedDocument, nice work.

    #3311

    AdamStrange
    Participant

    there are actually 3 kinds of positions data:

    AL_SEC_OFFSET AL_BYTE_OFFSET and  AL_SAMPLE_OFFSET

    the first one AL_SEC_OFFSET is time based

    Glad you approve 🙂

    #3315

    AdamStrange
    Participant

    I like the ‘Playhead’ addition, will definitely add that although I think I might use ‘SampleIndex:Int’, just a bit more descriptive I think

    mmmm. I thought about that and here’s my answer:

    Playhead is the industry standard for the position of any playing/position thingy

    if you talk about playhead to a sound engineer in reference to a sound clip they know what you mean. it is the current position of the sound that is playing.

    similarly, playhead means the current position in a song

    or in a media clip of any kind.

    You would never say “move the sample index of clip 4 to position 1423 please” You would say “Move the playhead to the middle”, etc

    Where you would use something like sample index is in talking to a computer. The computer has no concept of a playhead, but likes direct position information.

     

    Playhead, just makes sense

     

    OK, second thought

    Sample index. Monkey2 doesn’t use samples it uses sounds (they might be actual samples of sound), but they are Sounds. Sounds are played by channels.

    Using sample index is bringing in another layer of complexity. suddenly to position the playhead in a channel, I must know that a channel is playing a sound and a sound is really a sample?

     

    Now you and I both know exactly what is going on underneath the hood. You say sample index, I say playhead. But The best this we can aim for here is clarity and simplicty. If everyone knows what a playhead is, surely it make sense to call it playhead?

     

    Q “How did you make it loop like that?”

    A “I just reset the playhead to the start at this point”

    ” ah ok, makes sense”

     

    Q “How did you make it loop like that?”

    A “I made the SampleIndex 0”

    Q “The what?”

    A “the sample index… a sound is a sample and it has an index”

    etc, etc

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.