This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Show and tell
  •  » xaby's composer - a full MIDI import/export + converter in Scratch 1.4

#1 2009-11-09 09:02:31

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Hello fans,

today I will give you the mighty power of MIDI in Scratch 1.4
I worked nearly a year on it, and it is great. I saw that you looked for a MIDI support in Scratch and here it is.

You don't need to change your Scratch 1.4 or 1.3
you can copy some programs out of my "xaby's composer" and integrate the MIDI player in your programs

It is simple like drawing a sprite :-)


http://www.folker-linstedt.de/scratchforum/xabysinst.png


Supports:

128 instruments, 61 drums, additional sound effects, tempo changes, patterns, loops,
volume control for every single note, ployphonic playing till 48 drums at the same time
or 12 instrument notes at the same time

enough for 10 finger playing and a simple beat in the background


Features:
- arrange melody and beatloop blocks with simple drag'n'drop
compose a beat once save it as sprite or in the xaby's composer palette and
use it so often you need it
simple copy function

like arranging samlpes in Magix Music Maker, but not with WAVE samples,
you do this with your own MIDI blocks

the MIDI blocks can be created with several tools, some of them integrated in
xaby's composer (the future of MIDI composing :-)
and same you can program by yourself as external Scratch application

import and export the MIDI "files" is as simple as import and export sprites,
because I store the MIDI-Data into a picture with the Scratch GIF-color-palette

So it is also very easy to use your songs in your other programs


I am very interessted in making music and I love good and simple music programs
like Mario Paint Composer (look for it on YouTube)

I saved also some good Scratch music programs in my Music-Galery to figure out
what is a simple and good way to compose music, songs, beats etc. ...

My idea was, to make a good flexible system where everyone can put some music tools into it

Here is a list of tools I love:

- piano roll (for composing with a pianolayout)
- notes on lines (note sheets for printing a music book, lerning)
- beat generator, 16 steps in a loop to compose a loop, beat, rhythm

http://www.folker-linstedt.de/scratchforum/xct2.png

additinal tools:
- music importer with the new Scratch 1.4 ANSWER-Block
(converts text strings into a playable MIDI-sprite)
it is fully compatible to the Mario Paint Composer "textfiles"
open a Mario Paint Composer file in a texteditor and copy the text into the clipboard
and paste it into the ANSWER. It will converted.

http://www.folker-linstedt.de/scratchforum/tools.png

- some different drum / beat generators, with different useability.
some mor easy to use, other more complex

esoteric composer, piano falling balls composer :-)
http://www.folker-linstedt.de/scratchforum/esoteric.png

advanced feautures and tools:

- QR-Code exporter for tranfering your songs to your mobile device / phone
- Scratch-Tunes, to scrolling between the greatest songs done in xaby's composer
- 128 channel equalizer, volume control for every note altitude
- simple change for instruments or drums, copy and paste block tools
- lyric tools
- block search, finding a block you named for better finding
- colorize your blocks to categorize them
- beat box, rhythm via microphone

- Mario Paint Composer clone for easy composing


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Working:

Choose an instrument or a drum, instruments on the left side, drums on the right site
click on a simbol, when you click on a choosen one, you will come to a instrument
or select tool

when you choose an instrument, you can use only the melody tools
if you choose a drum, you can only choose the beat-loop tools,
but most of the tools I integrated I programmed so that you can use them for both

to save drum information it needs up to 2 pixels, for instrument notes it needs up to 4 pixels. your blocks can store 12 pixels at the same time
you can playback 4 blocks at the same time, thats 48 pixels

one pixel can store 6 bits, (64 states)
drums without volume / velocity only need one pixel because you have only 61 drums

to have the full MIDI functions (out of balance :-( 
one note needs for pixels

every note can store instrument (one of 128+, volume, altitude)
the duration will be saved with the number of pixels next to each other

drums have everytime the same altitude and the same duration (one pixel wide)
... but it's possible to change the tempo while playing automaticly
additional information will be store in the blocks

so it's possible to jump from one playing block in the "music sprite" to another,
not only to the next one, it's usefull for chorus, loops, patterns, test some parts
of the song, store some songs at one sprite ... etc.

in a music block it's also possible to store text for:
- copyright information, author
- song text, lyrics, karaoke
- name of the melody / beat-loop block

so it's also possible to have a great amount of usefull blocks for sharing

you can compose a block, store it as GIF-file, post it in your blog, website, in your  signature, in your projects ...

sharing MIDI snippets :-)


The technique is also usefull for little animations, playing music and change
sprite costumes like in video editing software or FLASH time line


My own technologies
- DragON (ball Z :-) I call my routines for draging and dropping, simple copy ... DragON
- marking positions is also a component of the DragON
- simple Tool registration, one line for the integration of new tools

my techniques can be usefull in
- operating systems (OS) multi windowing with layering
- strategy games, or buiding games like Pipe, SimCity, Tycoon ...
- or tables with marking fields (like in Excel)
- drawing editors, and level designers for all kinds of games


___________________________________________________
inspired by

Sound Club (Bluemoon Software)
Mario Paint Composer
Magix Music Maker
Dance Machine / Dance Ejay
Reason 4
FL Studio

I hope with that "engine" we will create a lot of great music tool "plugins"

Scratch rulez

Enjoy

Last edited by xaby (2009-11-09 09:28:17)

Offline

 

#2 2009-11-09 09:46:45

BWOG
Scratcher
Registered: 2008-09-19
Posts: 1000+

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Are you going to post it on the Scratch site? (Probably not, it sounds like it'll be really big!) If not, you should post in on a download site.

Offline

 

#3 2009-11-09 09:50:54

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

I will post it here. Hope before christmas. Some glitches have to be resolved. It is 1.2 MByte big. It is so small that you can integrate more tools and much music in sprite format.

Over a hour of MIDI music in a 9 MByte Scratch project

One page of music takes ~ 2 minutes if you use 3 blocks at the same time
(3 blocks can contain up to 9 instruments or 18 drums, best is 6 instruments and 6 drums)
and the tempo of one block is 1.5 seconds

a PNG file will be ~ 300 kBytes with such a song
If you use patterns and loops, your song will be longer than 2 minutes at the space of 300 kBytes

Last edited by xaby (2009-11-09 09:57:21)

Offline

 

#4 2009-11-09 09:52:10

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Sounds interesting. So will this allow us to import our pre-composed MIDI files into Scratch?

Last edited by cheddargirl (2009-11-09 09:56:04)


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#5 2009-11-09 10:03:26

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

If someone is able to write a MIDI to sprite tool as external program.

I wrote one for Mario Paint Composer files and for the MIDI-XML export from http://www.hamienet.com/

But I don't know exactly how a MIDI file will be stored. I converted some of my own MIDIs
with SoundClub into a black and white piano roll layout. And grabed every pixel from my picture. But it is only a good method, when you have a great screen and a small song and not so much instruments.

Maybe we will find a programmer who is able to convert MIDI files into an easier text format like the MIDI-XML from http://www.hamienet.com/

I think, it can be possible, to upload your MIDIs there and download it as MP3 or MIDI-XML

A link to my MIDI-XML to PNG converter a will post, too.

Offline

 

#6 2009-11-09 11:24:52

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

I will look here, and will write a online converter, you can upload your MIDI files at my website, and will get a generated PNG

http://staff.dasdeck.de/valentin/midi/

This PNG you can drag into scratch as costume for the music sprite and
press play in the xaby's composer :-)

Hope, it will work and will be fast enough

regards, Folker

Last edited by xaby (2009-11-09 11:27:24)

Offline

 

#7 2009-11-09 18:46:42

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Awesome idea, thanks for giving me a link. But I'm not sure if I'll put it to use when you release it - I got Guitar Pro which has better quality sounds than my MIDI-MP3 converter. But MIDI blocks are good to save space  smile


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#8 2009-11-10 05:34:49

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Guitar Pro looks like Melody Assistant. I love Melody Assistant. It has also a great Sound Bank.

I testet also a method to play MIDI notes with own WAVE-Samples.
http://scratch.mit.edu/projects/xaby/704821

I hope, in a future version of Scratch we will have Sound-Effects like the graphic effects.

Speed, Pitch, Volume, Balance
like in AudaCity. But in real time.

One WAVE-Sample, and with an effect it's possible to transpose it to every tune :-)

Offline

 

#9 2009-11-10 07:56:22

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

xaby wrote:

I hope, in a future version of Scratch we will have Sound-Effects like the graphic effects.

Speed, Pitch, Volume, Balance
like in AudaCity. But in real time.

One WAVE-Sample, and with an effect it's possible to transpose it to every tune :-)

We already have Volume, but I think I once read a post by Jens, where he said he created a block to detect the mic input's pitch. I'd like to see at least that in the next major release  smile


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#10 2009-11-10 12:06:16

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

To controll the output speed for playback would be a great thing

Mickey Mouse Voice :-)
Dark Vader Voice :-)

Offline

 

#11 2009-11-18 10:30:27

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Is this still under development? I remembered this and searched around the forums for this topic, but there aren't any links to the Scratch Project or the MIDI-PNG converter.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#12 2009-11-20 07:44:43

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

It is still under construction. I lost a week because of illness.
I will integrate the "drum choosing tool" and some beats for better presentation.
Drums working a little bit better than melodies yet. :-(

And the MIDI-PNG converter will be finished in a few days. I had some problems with PHP, Apache and Webservices under Windows 7.

Now programming under Windows 2000.

Comming soon. Will upload next week the project. If it works or not.

Offline

 

#13 2009-11-20 09:15:02

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

xaby wrote:

Now programming under Windows 2000.

Lol, I'm using Win2K right now too.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#14 2009-11-20 15:16:34

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Here is a version ...

http://scratch.mit.edu/projects/xaby/767674

known bugs: drum choosing tool will not be activated right. (green flag to restart)

Problem discription:

To make it as easy as possible I though about a simple integration of "third party"-tools

I call it "track system"
The tool work like windows. And the tracks like buttons on a window.
In some programming languages they called gadgets.

Following structure:

A track is a list gadget. It has items. In rows and columns.
To be able to have multiple tools, they have to be activated and disabled.

also the tracks.

First every track has it's own coordinates.
x-start, y-start, x-end, y-end
and in a list is a bit set for "track is on" or a zero for "track is off"

a tool is a combination of tracks.
if you use a tool it will activate some tracks. This works like a constructor in an
object orientated language.
and if you don't want use this tool, you use a destructor to disable a group of tracks

because of the delay in a loop in Scratch some code is not optimized like I would do in another programming language.

This is a great problem in big programs.
Because to have performance I had to double the code. But to double the code
will slow down the editor, when it is more code than on one screen page fits.

Also having more variables than on one screen page fits, make the work very hard.

I am using 1600 x 1200 and a 2 x 2.3 GHz Core to Duo with 4 Gigs of RAM (2.5 usable)
but is very slow.

And a great problem is also when having Scratch in background it is using 100% performance of one core. It's not energy efficient. :-(

Often I wish, I can switch between Scratch in Text-Programming without using mouse
It would be much faster.

Maybe 3 modes for Scratch.

One with only pictures and symbols for Kids till 7.
One like it is now.
And one for older ones with the ability of writing and a turbo-Mode.

Scratch would be the greatest programming language ever.

Offline

 

#15 2009-11-22 07:19:09

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

http://www.folker-linstedt.de/scratchforum/xc_helpbasics.png

Last edited by xaby (2009-11-22 07:19:27)

Offline

 

#16 2009-11-29 17:54:41

xaby
Scratcher
Registered: 2008-02-13
Posts: 49

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

I still work on it. Comming soon.

Offline

 

#17 2009-12-29 14:09:16

butheadrecoverdwpa
Scratcher
Registered: 2009-01-25
Posts: 25

Re: xaby's composer - a full MIDI import/export + converter in Scratch 1.4

You mean you are working on a big picture, the scratch project, or the midi to png converter or whatever it was (I didn't really understand this stuff)

Offline

 
  • Index
  •  » Show and tell
  •  » xaby's composer - a full MIDI import/export + converter in Scratch 1.4

Board footer