Discuss Scratch

elfin8er
Scratcher
100+ posts

Importing Midi Files (1.4 or 2.0)

Does anybody know of any way I can import a midi file into scratch (note blocks) yet? It seems that it would be possible (especially on 1.4) since the note blocks are just midi notes (right?).

Last edited by elfin8er (May 26, 2013 03:36:03)

Hardmath123
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

You can convert to an mp3 first, I guess…
elfin8er
Scratcher
100+ posts

Importing Midi Files (1.4 or 2.0)

Hardmath123 wrote:

You can convert to an mp3 first, I guess…
I was wanting to play it with the note blocks in scratch. If it's possible.
elfin8er
Scratcher
100+ posts

Importing Midi Files (1.4 or 2.0)

What I'm thinking I'll have to do, is convert a midi file into text, and then import that into a list for scratch to then play.
Hardmath123
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

Right—but you'll have to hack the MIDI file format. You should write an intermediate converter to a plain ol' list of notes using something like this beautiful framework in JavaScript.
elfin8er
Scratcher
100+ posts

Importing Midi Files (1.4 or 2.0)

Hardmath123 wrote:

Right—but you'll have to hack the MIDI file format. You should write an intermediate converter to a plain ol' list of notes using something like this beautiful framework in JavaScript.
Yeah, that's what I was thinking, but I'd rather have something already written. I'm not the best at JavaScript.

Edit: I was able to find this. The guy said he used Rose Garden. Ever hear of it?

Last edited by elfin8er (May 26, 2013 23:15:34)

Hardmath123
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

Find what? And I haven't heard of Rose Garden…
OrcaCat
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

Yeah, I wish you could import MIDI's as Scratch code.
elfin8er
Scratcher
100+ posts

Importing Midi Files (1.4 or 2.0)

Hardmath123 wrote:

Find what? And I haven't heard of Rose Garden…
Oops, forgot the link. Editing now.
blob8108
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

Does the MIDI file ever have two notes playing at once?
Hardmath123
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

Good music almost always has concurrent notes, or notes that start while others are playing. But that's the piano player in me talking, as a trumpeter and he'll say melody runs the show. *shrugs*
dreamod
Scratcher
100+ posts

Importing Midi Files (1.4 or 2.0)

Hardmath123 wrote:

Good music almost always has concurrent notes, or notes that start while others are playing. But that's the piano player in me talking, as a trumpeter and he'll say melody runs the show. *shrugs*
You know what? In dream, I'm actually fixing that problem. I've modified the play note block to play as many notes as you want at the same time.
And, yes, concurrent notes are very necessary. I compose and play alot of music. ^^
I'll see what I can do with this. Squeak has a built in midi reading function. I could add a midi importer to Dream
blob8108
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

Meh. I don't see how you're going meaningfully to import a MIDI file to note blocks unless it doesn't have concurrent notes.

EDIT: otherwise, I'd write a quick Kurt script…

Last edited by blob8108 (May 27, 2013 16:09:48)

nXIII
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

blob8108 wrote:

Meh. I don't see how you're going meaningfully to import a MIDI file to note blocks unless it doesn't have concurrent notes.

EDIT: otherwise, I'd write a quick Kurt script…
Each concurrent note needs a separate thread, so start each one with “when I receive <play {filename}>” and a rest.
dreamod
Scratcher
100+ posts

Importing Midi Files (1.4 or 2.0)

blob8108 wrote:

Meh. I don't see how you're going meaningfully to import a MIDI file to note blocks unless it doesn't have concurrent notes.

EDIT: otherwise, I'd write a quick Kurt script…
Well, in Dream (my mod), the note blocks allow you to play any amount of notes in the same block Would that sound interesting?
blob8108
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

MIDI files are complicated. O_o
blob8108
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

dreamod wrote:

in Dream (my mod)
That's cool — but I don't use mods, I'm afraid
DigiTechs
Scratcher
500+ posts

Importing Midi Files (1.4 or 2.0)

blob8108 wrote:

MIDI files are complicated. O_o
Eh, you get used to them when you have to see a scrolling wall of the stuff.

I use FamiTracker, which goes OVERKILL with the hex values
blob8108
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

Here's how I'm going so far: project. It sounds slightly “off” only because I quantised the notes to make the scripts read better. The source was just the first Google result for “MIDI file”.

The question is — is importing a MIDI file to “play note” blocks even a useful thing to do? Unless it's a very simple MIDI file with only one note playing at a time, I don't see how it's going to be any better than any other way, such as importing to lists.
Hardmath123
Scratcher
1000+ posts

Importing Midi Files (1.4 or 2.0)

blob8108 wrote:

Here's how I'm going so far: project. It sounds slightly “off” only because I quantised the notes to make the scripts read better. The source was just the first Google result for “MIDI file”.

The question is — is importing a MIDI file to “play note” blocks even a useful thing to do? Unless it's a very simple MIDI file with only one note playing at a time, I don't see how it's going to be any better than any other way, such as importing to lists.
It would be so infinitely COOL! Did you see the first demo on the page linked above? Delicious.

Powered by DjangoBB