User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: See a 1 on the loaded edit box? play a sample!!!

  1. #1
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)iOS Export Module (Steam)
    Aloan's Avatar
    Join Date
    Dec 2008
    Location
    Massachusetts, USA
    Posts
    368
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb See a 1 on the loaded edit box? play a sample!!!

    My dear good friends from this wonderful Forum how are you all doing? I hope you're doing really well! I still haven't got past the happiness of owning
    the 2.5+ DLC.. it is such a breath of fresh air!!! now..

    This all seems awfully easy/ simple for someone who knows how to deal with the edit box and string parser (my bet)

    I wanted to create a fun play a pre-composed song: something like this...

    Say I have already imported musical note samples (do,re,mi,fa,sol,la,si) as .ogg. so Fusion already has the musical notes stored into it.
    Say I have opened a notepad in windows and written: 1-2-3-4-5-6-7 and saved it (music.txt).
    Say I ran my application and pressed L and it loaded that music.txt text file using the edit box and it is showing: 1-2-3-4-5-6-7 on the screen.
    Hoorray at that!
    BUT Now, How can I say to Fusion: If I press P:

    1- read what is inside the edit box from left to right
    (When Fusion reads 1)
    2- Play the "Do" sound.
    (When reading the Dash sign)
    3- Wait half a second.. and so on!!

    The playing part and waiting I obviously know and I'd use a group for the wait time,
    But the Reading and Acting upon What Was Read is what I don't know... would anyone be kind to send me a light to that magic? Thank you!!!

    by the way I am going to upload my mfa with what I have already done, just a moment
    and here is the text file I wrote: it is the Happy birthday song:
    1.12..1..4..3.....
    1.12..1..5..4.....
    6.61..6..4..3..2.....
    E.E6..4..5..4.....

    what it means:
    Each period is the wait time (a quarter of a second, perhaps)
    1,2,3,4,5,6,7 white musical keyboard notes
    A,B,C,D,E black ones...

    Btw the actual "coding" (laughs) I tried for this specific stuff starts at line 98!!!! yes. forget all the stuff before it...
    Besides the edit box, I also have put into the mfa: the data store 2 object, the parser object and the ini++ object in there just in case it is needed... but if you'd like I can later send the mfa with just the edit box... I had put all those in there at first to try to test with each, but (the truth of the matter is) I don't know how to work with any of them (as I never studied them) and I forgot to remove as I uploaded.. sorry.
    Attached files Attached files

  2. #2
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)iOS Export Module (Steam)
    Aloan's Avatar
    Join Date
    Dec 2008
    Location
    Massachusetts, USA
    Posts
    368
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    By the way, this is just for my own self fun here on my PC. If you think this is a cool idea for you to use on your own commercial venture, go right ahead!.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module
    aa2953b4's Avatar
    Join Date
    Feb 2019
    Posts
    63
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Where does your ini++ version come from?
    Images attachées Images attachées

  4. #4
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)iOS Export Module (Steam)
    Aloan's Avatar
    Join Date
    Dec 2008
    Location
    Massachusetts, USA
    Posts
    368
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aa2953b4 View Post
    Where does your ini++ version come from?
    Oh! it comes from the manager. I downloaded from there.... unless it is a copy from an old save (mmf2) and I have not updated it.
    I am quickly answering you, but what I will do is (I have updated my synth mfa and thus have had it only have the string parser and the edit box (aside from the obvious Walrus Full Screen object for my 320x224 90s arcade like resolution). Here it is!
    You can now record two voices (same instrument but one will play in channel 1 and the second on channel 2)
    Last night I was heavy at developing and so updated the musical keyboard a lot (now you can use both the mouse or keys to play and record)
    I tell you this is the fastest music making program I have ever seen... I got the tip from the good old Casio SK-1 with its two key play feature (which I may implement into this later! I have tested such feature here and it works...
    Now if you press L it loads a pre-composed happy birthday song, but that is the problem, I don't know how to make it play it, because I suppose it requires string parsing and/or edit box knowledge beyond my understanding?!
    and also: here is the updated musica.txt which has the composition. The delimiter is now a Period. You can copy paste to a notepad:

    C.-.C.D.-.-.C.-.-.F.-.-.E.-.-.-.-.-.
    C.-.C.D.-.-.C.-.-.G.-.-.F.-.-.-.-.-.
    A.-.A.C.-.-.A.-.-.F.-.-.E.-.-.D.-.-.-.-.-.
    5.-.5.A.-.-.F.-.-.G.-.-.F.-.-.-.-.-

    Letters now correspond to actual musical notes (white keys: C,D,E,F,G,A,B), numbers (black musical keyboard/piano keys, so there are 5 total / 1,2,3,4,5) - Dashes are the musical ticks without notes (beat)
    The song tempo (tick time) I have put default to 35 hundreds of a second.
    While I wait, I'd like to study about the edit box (all it can do) and same for the string parser. Does anyone know a good reading tutorial on those two?
    Attached files Attached files

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Play music sheet with string parser example

    The reason we can't open the mfa is because you are using an old version of Ini++. The old one has the filename "INI++.mfx" while the new 1.5 version one is "INI++15.mfx"

    I have made an example for you on how you can play the music with string parser object.
    You set the delimiter to period .
    Then set the source string to the music sheet.

    You then want to loop through the elements of the string parser object (notes and pauses)
    at a predefined tempo so you can't use fast loop.

    I used the fire event and then substract a number of elements left to go through the song.
    Then for each element you compare it to the different notes and play it.

    See the attached example.

    I hope it helps
    Attached files Attached files

  6. #6
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)iOS Export Module (Steam)
    Aloan's Avatar
    Join Date
    Dec 2008
    Location
    Massachusetts, USA
    Posts
    368
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank a Million, Decal! I'll check and see! since the 90s I've been liking this way of composing music: doing it via a piano roll is the "standard easy" but this was is even faster because it is all keyboard based and follows a correct beat (just like trackers, but fast and easy)
    Update: I imported your frame to my synth mfa and acted accordingly to your instructions with the changes to play the samples and OMG! it worked! I was smiling like a child when I heard the birthday song! You ROCK!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    I will definitely study and read all you did there as this is really awesome!
    As I continue to make the little GUI and features better I will sure send you a copy!

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm glad to see that it worked
    To change the tempo just change the "Fire Event" time to what ever you like. You can also click the "Use calculation" and then set it during runtime if you like (it will be in milliseconds).
    Also remember to never have any line change in the txt file holding the music sheet.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post To add more music sheets to be played simultaneously

    To add more music sheets to be played simultaneously I just cloned a string parser object to get another one, and then set the source string to another music sheet.
    Then I added two new variables to the "aData" object ("elementsLeft2" and "onEvent2") Which are basically a clone of the two variables that are already there.
    Then I copied and paste the code for playing the music and changed it to use String Parser 2 and "elementsLeft2" and "onEvent2"

    See the attached example.
    Attached files Attached files

  9. #9
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)iOS Export Module (Steam)
    Aloan's Avatar
    Join Date
    Dec 2008
    Location
    Massachusetts, USA
    Posts
    368
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Great! here is the little song I've done! remember Bobby is going home, for the Atari 2600? thank you!

    Just press P (play) when you've started the frame (F7)
    Imagine expanding this to include drum and bass samples...
    btw, I forgot to include the walrus full screen object to the frame so the full screen is not what is meant to be (pixel perfect) nor the letters.
    So add the walrus fullscreen to fix
    to be honest, I wish there were no need for delimiters, because we have to fill the original note composition with lots and lots of periods
    If it only knew that it should read the letters and numbers on a set time... but oh well..
    I also think that this little program paired with the midi object someone did for Fusion could be powerful. if someone would like to pick this up to edit and/or expand, feel free! I'd love to hear/know what you've done (just remember Decal and Aloan) !
    btw again: here is the online piano I used to get the right note numbers and letters (I do have a real musical keyboard, but why should I plug it on when you got this): https://virtualpiano.net/
    Attached files Attached files

  10. #10
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)iOS Export Module (Steam)
    Aloan's Avatar
    Join Date
    Dec 2008
    Location
    Massachusetts, USA
    Posts
    368
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    I had not realized! here is the actual mfa!

    My 3 frame mfa should now open as I've removed the old ini object.
    If you then see frame 2, my wish is to merge your technology in frame 3 with mine in frame 2!
    Be able to as we type the musical notes it gets written into the edit box so the composition can later get saved and loaded on PC
    This opens up the door to quick composing and making tunes! Faster than that, I have never seen in the world! well..

    Yes I've seen with the 80s Casio SK-1 - but why the heck did CASIO remove this awesome feature and why no other company re-created this Fast composing feature is beyond me! I remember making fast tunes with the delete a wrong note then play the recoded notes using just two keys feature! - those were the killer features: delete a wrong note (while step key recording) and after you'd be done, replay the corrected recording using any of the 2 buttons (2-key play buttons) THAT was awesome! this Replay would then get auto-saved....

    You could then just press play afterwards and hear your recorded song to perfection! That is what I am trying to replicate here! and I am very grateful for Decal's help!

    Btw, such feature is best useful for single tone instruments like drums, bass, flute.... or a solo... it most likely would not work well on multi-string instruments, unless you execute them at once and not in a fast sequence (strumming) - this is also perfect for chiptune making IF you get the musical scale notes from a (say) chip-tune soundfont for example and bring it into Fusion (as .ogg samples such as I did recording octaves 3 and 4 for this mfa with my own Yamaha DGX-205 musical keyboard Steel Guitar samples + Audacity to record and convert to .ogg)... my favorite is the YM2151 used in the 80s Arcades (of course)

    Just so you all know, I have created (I probably am the only guy in the world that did that) a way to replay a musical recording using an image! Yes an image! (see the little pixel actives in frame2) it's still a wip, but it can be either an alternative (to notepad alpha-numerical composing) or the best way to compose.. Compose using PIXELS! on your own paint program or in-game as you type the notes (the "game" does it for you)! it works similar to a music box, where the dots (pixels) will come scrolling from the right and touch/collide with the set of comb notes on the left! (cause, remember) this is in 320x224 90s arcade cabinet resolution, so you can indeed distinguish a pixel on-screen!

    Lastly: My Whatsapp number is +5527997277273 - I was thinking we can form a Fusion group. (I wonder where are the Fusion WhatsApp groups out there!) so we can audio talk this great idea further (should you want).
    Attached files Attached files

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 27th June 2018, 05:56 AM
  2. The difference between play sample and play sample 1 time?
    By mobichan in forum iOS Export Module 2.5
    Replies: 0
    Last Post: 17th August 2016, 04:30 PM
  3. Play sample every 00.10 second
    By Popcorn in forum Android Export Module Version 2.0
    Replies: 10
    Last Post: 7th May 2012, 09:18 PM
  4. play sample when another sample has finished?
    By edward in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th October 2006, 02:55 PM
  5. Order of "play sample" and "set sample volume".
    By Nifflas in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th September 2006, 07:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •