Random Midi Player - Gramp v0.2

Synthesia is a living project. You can help by sharing your ideas.
Search the forum before posting your idea. :D

No explicit, hateful, or hurtful language. Nothing illegal.
Lemo
Posts: 313

Post by Lemo »

GRAMP Player v0.2
Image
Features
Random midi "cloud" play from web or local sources
Play with Synthesia or just listen to the infinite playlist
No songs written into you drive except the ones you want to keep
Interactive play log to retrieve source page, sheet, or details
Drag n drop any midi file into window to play and preview tracks


Tools tips
Start GRaMP by choosing a mode
Pick an instrument to display its full name
When BASSMidi driver is installed, the notes box shows current soundfont at startup
Saved songs are transferred to their respective source folder
Double-click a source name to open its folder or a line in the Playlog to get the source


Coming next
BASSMidi library support
Working timeslider and length display
Google as source


Download Gramp v0.2 (2.6 Mo)

v0.1 Release notes
v0.2 Release notes


Download above, and some goodies to go with it:

Open and edit Gramp source - A small but neat soundfont - The sountfont system driver
Last edited by Lemo on 06-02-11 4:29 pm, edited 10 times in total.
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
Lemo
Posts: 313

Post by Lemo »

EDIT: Initial post moved below:

Hey, here is little script I did to run any midi with Synthesia in a random order.

Well, actually I copy-pasted most of it, I'm not that good at programming :p

Basically, you just have to run it inside a folder with some midi files, and the script will choose one and play it with Synthesia.
When the song ends, the game closes, the script chooses another file, and so on.
For example, if you have several folders, with multiple kinds of midi, you may also place a copy of the script in each of them,
and create neat shortcuts in your start menu.
I decided to make it minimalist, so there is no track selection or score display, just a quick loop that uses your usual track settings.
You can use F1(anytime) to close the script, or hit Esc while in Synthesia to stop or go to the next song.

Image

There is a few things you can change, and that's detailed in the text file.
I included an .exe version if you wanna try without installing autohotkey (you won't be able to edit though).
Here is the link to install Autohotkey, and the file is below.

@Nicholas
It would be nice to have a command line option to disable the "Synthesia is already running" message, and override the current midi by another one (in the same window).
Also for some reason the file title is not displayed when launching a midi individually?
Attachments
RandomPlay.rar
(315.91 KiB) Downloaded 493 times
Last edited by Lemo on 05-19-11 5:10 am, edited 1 time in total.
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
Lemo
Posts: 313

Post by Lemo »

Here comes the unlimited web version :]
This one is quite close to my idea of Midi webradio, except it's not the same stream at the same time for everyone, and you don't have a real person behind it to choose arrange the tunes in a clever way ;)

Anyway, here is what it does for now:
This version loads a random midi from the Mutopia Project, and runs it with your default player for midi files.
If you're using Winamp for example be sure not to allow multiple instances to make it work fine. Also you can check the webradio thread above to connect Winamp to a VSTi.
The music will play for 30 seconds, then another random one is loaded from Mutopia to Winamp. You can change the length if you like, but I like it this way just for previews.
Just like a webradio, each file is erased when the new one arrives, but if you like what you're listening to, you can save it with F2 to play it later with Synthesia.
To close the script hit F1.

Image

File is below. Again you can use the .exe directly or install Autohotkey and use the .ahk
Have fun ^^
Attachments
RandomPlayWeb.rar
(316.07 KiB) Downloaded 478 times
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
Lemo
Posts: 313

Post by Lemo »

Here is the web version for Synthesia \ :geek:/
I decided to switch from Mutopia to 8Notes, because their selection is probably better (well at least IMO). Mutopia apparently got a bunch of very old or unknown pieces for specialists, while 8Notes managed to find the ones that went through the centuries without sounding from another age. Or maybe it's just the way they set up their midis, I dunno.
Also 8Notes tend to name their files with a more explicit name, which is quite handy when you don't know what you're gonna get.
They also got a nice name you just have to flip around to create infinite Notes :mrgreen:

Image

So what you get with this version is a random loader that get midi files from 8notes, and play them in Synthesia.
I think they got a bunch a files there coz their id goes beyond 13000 or maybe more.
Just like the previous "player-oriented" version, you can save the current midi with F2, while the rest of the stream gets deleted as it flows.
Again I'm not a programmer so if you think the code is weird it's quite normal :p
I still have some issues btw, because their website can display a midi link from php, even if the file is not there, so I got to run some checks that slow the thing a bit.
(As I don't know much about accurate regex and weird stuff like that)

Anyway I had some fun doing it.
If by any chance I'm not the only one interested in this, I still got some ideas to improve the whole thing.
For the new version I'll probably group those three scripts in a single one, where you can choose local, player, web, or several sources at the same time :roll:
Attachments
RandomNotes.rar
(395.33 KiB) Downloaded 484 times
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
aria1121
Posts: 1505

Post by aria1121 »

Looks pretty awesome.

But hey, you're also able to create podcasts in PalTalk if I'm right.
If you want to create a webradio, isn't it a good idea to play 24/7 some music on a randomly generated podcast on Paltalk that comes out of your speakers, thru an awesome linked-to-Paltalk program?

Now getting some off-topic:
Lemo wrote:I think they got a bunch a files there coz their id goes beyond 13000 or maybe more.
It's OVER 9000!

Now back:
If PalTalk is a bit too simple, there is some more advanced way using WinAmp running from Nicholas' server, broadcasting live from a 'democrated-radioforum' (or something like that, so you don't need to sit infinitely long at the computer to set it all up again). If you want I can explain the whole process detailed and the source etc.
Lemo
Posts: 313

Post by Lemo »

Thanks for the interest :)
If you're talking about shoutcast, the plugin has no support for midi streaming,
and I suppose it's just the same for "PalTalk", or at some other server providers.
Of course you can convert your midi to mp3s but that's not what I'm interested in.

Probably the most simple way is to get the files one by one, as this script is doing, but I guess this topic is just gonna be for the random
part of it, the user being at the center of multiple sources. While the other topic will be for the webradio, server-oriented, editorial kind of way.
Last edited by Lemo on 05-10-11 5:36 pm, edited 1 time in total.
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
User avatar
DC64
Posts: 830

Post by DC64 »

When playing the random midi player, whenever there is a copy of one song then it finds another midi.
How can I override this command?
"And now for something completely different."
User avatar
DC64
Posts: 830

Post by DC64 »

Where is the randomnotes getting the midis from?

Also random playdoes not like the texts:
( ) _ - , . and the other ones.
"And now for something completely different."
Lemo
Posts: 313

Post by Lemo »

DC64 wrote:When playing the random midi player, whenever there is a copy of one song then it finds another midi.
How can I override this command?
Hum I'm not sure I understand :? , you're talking about the first version right?
What is the command you want to override, the copy, or the switch to another song?
DC64 wrote:Also random playdoes not like the texts:
( ) _ - , . and the other ones.
"RandomPlay" (v1) shouldn't have any problem with those as it's just a *.mid code thingy

You're talking about "RandomPlayWeb"(v2) maybe?
As this one is only based on Mutopia, I know it has issues with a very few files at the end of the list with additional dots "." but that should be all
That's due to my lack of knowledge with regEx, I told you I wasn't a programmer :p
You can contribute if you know the fix, or send me some midi if there is a problem with a particular one (for local version)
DC64 wrote:Where is the randomnotes getting the midis from?
I don't know, I believe it's magic :)
The website is mentioned at least three times, my english is really that bad?
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
User avatar
DC64
Posts: 830

Post by DC64 »

Your english is great, I couldnt tell that you where french. (or another language)

Anyway, when I have 2 midis of the same copy in any location that Synthesia watches then the Randomplayer will not play the midi because there is a duplicate. I want to see if the command of 'do not play any duplicated midi'
or 'do not play any midi with this, that, ect...' can be overriden or changed for that not to happen
"And now for something completely different."
Lemo
Posts: 313

Post by Lemo »

Okay I tried to make a copy and I had the same message (Next time paste the whole thing it's easier):
Synthesia wrote:Duplicate option found. That, or you have an extra word in there somewhere that doesn't belong. (Only one filename can be specified.)
As mentioned, it's a duplicate in the options, not in your files.
When you make a copy it creates a "Copy of Song.mid", and with my previous code, Synthesia tried to load copy + of + song.mid.
That's why most of the midi you download don't have spaces, because it's annoying...especially for the web. Check this nice filename in my first screenshot :p
And why do you have to keep everything in double anyway o_O?
I updated the attachment in the first post, that should work now. I didn't know you could put quotes around a variable without any detection issues in autohotkey :)
Last edited by Lemo on 05-10-11 6:49 pm, edited 1 time in total.
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
User avatar
DC64
Posts: 830

Post by DC64 »

No, those werent quotes those are apostrophes (the apostrophes are the ' the quotes are " )
It was a bug that I did not like and it came up allot.

So what about the other indentions like the parentheses () or the period . or slash /

A list I have found:
()-_/?!@#$%^&*<>':;"~`+={[}]\|
Last edited by DC64 on 05-10-11 6:55 pm, edited 1 time in total.
"And now for something completely different."
Lemo
Posts: 313

Post by Lemo »

...
I wasn't talking about 'do not play any duplicated midi'
I'm talking about "%file%" in my script source code
Just redownload and try it. And stop with those copies :p
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
User avatar
DC64
Posts: 830

Post by DC64 »

Just to point out, I like the software allot.
"And now for something completely different."
aria1121
Posts: 1505

Post by aria1121 »

Then why would you have MIDI support for that? Must people be able to 'decode' right from their computer?
aria1121
Posts: 1505

Post by aria1121 »

Never mind, I thaught you meant just creating a webradio like sound-only, but you want to send MIDI right?
Lemo
Posts: 313

Post by Lemo »

aria1121 wrote:Then why would you have MIDI support for that? Must people be able to 'decode' right from their computer?
Well I suppose that any case, while the server would be running its own script, each user would also have to use a custom script or plugin to receive that.
As soon as the software solution exists, it's just would be a matter of a few clicks for the end-user.
aria1121 wrote:Never mind, I thaught you meant just creating a webradio like sound-only, but you want to send MIDI right?
Yeah no crazy sound format decoding. It would just be file-by-file "streaming" midi play.
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
TonE
Synthesia Donor
Posts: 1180

Post by TonE »

Btw. I use this technique to watch YouTube videos infinitely, like a TV. You press a hotkey, type in some keywords, and the results will be played one by one without any further interactions from your side. So it feels like a TV, but based on your keywords, kind of "custom TV" :) Of course you can switch to next video of the list if you do not like the current one. Also using cclive you can download the current video to your harddisk using another hotkey.
aria1121
Posts: 1505

Post by aria1121 »

Yeah, it would be a very good invention to have a "Random Channel"-button on your remote.
Combinating Synthesia on your TV would also be fun (like computer attached to your tv, the same size as your instrument)
Lemo
Posts: 313

Post by Lemo »

There is a program called Minitube also (if you're too lazy to program it yourself :p), I used to let it run sometimes on my lil netbook.
It may be a good idea indeed to have a search box for that random player too :)
With google you can be sure to have infinite results to choose from !
Stuff & experiments for Synthesia: Gramp v0.2SkinboxFireSynthVideoWebradio
Post Reply