PICO Composer v0.3
Changes
PICO Composer main menu
When you start the cart you'll be prompted to load an album or create a new one. Use the up/down arrow keys to navigate the menu and enter
to select. Either, or both, of the tempo and time signature can be left blank and you'll be given the defaults of 120 bpm and a 4/4 time signature. Any time signature that can't be parsed properly will default to 4/4.
When creating a new album the album name will be the name of the file—no need to specify .p8 extension—where your work will be saved. At the moment each "album" can only have a single song, with a single voice, on instrument 0. The idea though is to have each album contain multiple songs. Space constraints may end up making that infeasible but that's the plan for now at least.
Controls:
PICO Composer is intended to be run locally with a full keyboard and will save your work to a separate .p8 file.
Demo Song/Album
Download this cart and save it in the same directory as picomposer.p8.png
Load and run picomposer and when prompted select load album
, type song6
and press enter. It should load and after a couple of seconds you'll see the last few notes of the song. Press space
to play the song from the beginning.
When you export an album (press e
) a new file album_name.music.p8
will be created. This file can't be edited in Pico Composer and is intended to be imported for use into your own carts. To do so copy/paste the code from the example below and use the load_music()
and play()
functions.
(Note: The song data for this cart is in the spritesheet and it's "importing" from itself into upper memory. Usually you'll be importing from the generated .music.p8 file but I wanted a self contained example.)
The importer is currently pretty heavy sitting somewhere around 600 tokens. Once I've got a few more features implemented I'll revist and try to bring the size down.
Future Development/Feature Wishlist
- Select/edit note(s)
- Allow all the pico-8 instruments and custom instruments
- Multiple songs per album
- Dynamics: volume pp, p, mp, mf, f, ff, fff
- Allow up to 4 voices and ability to switch around between them
- Clefs. As is the staff is in treble clef. Adding, at least, bass clef would be useful
- Bar lines
- crescendo, decrecendo
- Repeat symbols and voltas
- Effects/articulations (tremolo, etc.)
- Maybe a mode specifically for notating drum parts
- Possibly the ability to convert to/from the pico-8 tracker format
- Joining notes when possible (connected 8th notes, for instance)
- Ties and slurs
- key signatures
- Draw leger lines
- Start screen with nicer menus
- Reduce importer code size.
Proof of concept version:
Ya looks good so far!
I was trying beginner's room but that requires 2 octaves and the deleting of notes is.. pretty needed but you got those things on your list.
If you need an easier way to show more octaves, you could use "8va" and "8vb" to distinguish.
Yeah, I wanted to keep the scope small enough to demo the basic concept and just make sure basic note entry and playback was working and made sense. But octaves and selecting and deleting notes shouldn't be too difficult to get working. Hopefully I'll have some time this week to chip away at it. Saving and loading will probably be my first priority since without that, what's the point? But that shouldn't be too difficult either.
Reminds me of a program I wrote years back called, "Prism Player."
I have a Pico-8 equivalent here:
https://www.lexaloffle.com/bbs/?pid=55917
To demo when the keyboard appears, hold the (O) "z" key.
@dw817
That's a really cool little tool, thanks for sharing. Fun to see a piano roll on pico-8!
Thanks, @jasondelaat. I have - not really been coding in Pico-8 recently. I guess I'm hoping for the almighty APK and then I'll continue my projects. I may have a long wait.
Huh. Sharps aren't showing for some reason. They should be....I'll have to figure that out. Later.
Edit: Okay sharps fixed. Uploading the right file tends to help. Go figure.
I am running into a problem, @jasondelaat.
If you enter these values:
TEMPO (BPM): 1
TIME SIGNATURE: 1
It crashes showing this:
Ah. That'll be the time signature. It's expecting something formatted as a fraction (4/4, 5/4, 7/16, etc.) I haven't yet added any checks to make sure input is well formed. I guess I'll add that to the list! And maybe include an example in the prompt.
The prompt, at least, I'll include with the next update which will be the exporter/loader code so that music can be used in other projects and not just within Pico Composer itself.
Thanks for letting me know about the bug, I appreciate it.
By the way, even if you're just playing around with it you'll probably want a higher tempo. The tempo here isn't the same as speed
in the tracker so with tempo=1 and a 4/4 time signature a single quarter note (press 3 while editing) should play for a full minute.
In theory.
I just tried it and that actually doesn't happen which is another bug likely due to an overflow. Another check I need to add. That'll go on the list too.
Anyway, 120 is a reasonable medium-ish tempo; 40 will be very slow; 200 quite fast, etc.
[Please log in to post a comment]