Compose (Yet another LÖVE project...Will I ever finish one?)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Compose (Yet another LÖVE project...Will I ever finish one?)

Post by Nixola »

Sorry for missing the space after the three dots in the title, too many characters ^^'


This is another project of mine, Compose. (I just typoed "Compost", so I think it'll be the official name now.)
It is VAGUELY (Image) inspired by Stelpa's LuvMatrixMono (it's the same thing, just bigger and polyphonic), it allows you to write simple music. The length of a "piece" written with this program is 128 quarters (for now), and you can have as many notes you want in a single quarter. Commands:
leftClick: toggle a square [on/off]
rightClick: toggle a square [start/stop]
m: toggle mode [sine/kick.ogg]
up/down arrow keys: increase/decrease tempo and reset time
space: pause
The notes are written to the left of the grid(I don't think they should be written like this, but whatever) and two red lines show you the current position.
If you have any suggestion or question, feel free to ask Image

EDIT: Added the possibility to create a longer note, right-click a square to toggle it between start and stop of a note (start is green, stop is red)
Attachments
Compose.noCanvas.love
It's called noCanvas, but it tries to use them when possible
(7 KiB) Downloaded 232 times
Last edited by Nixola on Mon Oct 22, 2012 8:35 pm, edited 3 times in total.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Stelpa
Citizen
Posts: 58
Joined: Sat Oct 20, 2012 4:48 pm

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by Stelpa »

Firstly, I would like to say: OMG SO MANY BOXES xD

I am really very surprised and happy that my very first project was an inspiration to someone, hahaha ^^

I am impressed also, I was confused how I would implement polyphony and you did it very elegantly, so it was actually helpful to me as well! Also, you did a good job of adding western tunings and a REAL SINE SYNTH (wow!), really really clever :)

Thanks very much for making this though, it actually helped me a lot in understanding how a more experienced programmer would do a similar project, and seeing what was different and the same was neat :3

<3 Stelpa
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by Nixola »

Selpa wrote:Firstly, I would like to say: OMG SO MANY BOXES xD
They're so many that they ended up being too small, I wanted them to be 9x9 originally
Selpa wrote:I am really very surprised and happy that my very first project was an inspiration to someone, hahaha ^^
I like doing music related programs in LÖVE and seeing other people do them (Right, Stonecrow? I'm still waiting ATree >.<), it's quite easy once you've understood how it works
Selpa wrote:I am impressed also, I was confused how I would implement polyphony and you did it very elegantly, so it was actually helpful to me as well! Also, you did a good job of adding western tunings and a REAL SINE SYNTH (wow!), really really clever
You can use the Notes module if you want, it has also triangular ('triang') and square ('square') waves ;)
Anyway I already have a music related project, so it has been relatively easy to do this (Except the graphics... I didn't want to use Canvases >.<)
Selpa wrote:Thanks very much for making this though, it actually helped me a lot in understanding how a more experienced programmer would do a similar project, and seeing what was different and the same was neat :3
Thank you, I've had to do a similar project for months, you did what inspired me to do it and now I can use it to create the former ^^
I didn't understand yet what notes are played in LuvMatrixMono, in which order and why (and I didn't look at the code yet)


P.S: What time is it there?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Stelpa
Citizen
Posts: 58
Joined: Sat Oct 20, 2012 4:48 pm

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by Stelpa »

It is 21:15 here in Florida, USA. LuvMatrix has rather simple code I think, but I didn't leave any comments (I will remember to do that next time!). It basically just reads an array, where array[beatnumber]=notevalue, and the harmonic series is really rather obvious (just pitch=series#). Hopefully that helps :)
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by Nixola »

I forgot to up for the new update (I only added long notes, I'll add horizontal and maybe vertical scrolling)
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by qaisjp »

no offense..
but did you really have to use a canvas?
Lua is not an acronym.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by Nixola »

I have to choose between canvases, spritebatches (that I don't like) and a strange way to draw that involves changing love.run, deleting love.draw and love.graphics.present(), otherwise it's quite slow (I didn't test it, but I have to draw 88*128 rectangles, it's not fast); I'm planning on making the third option available for those who don't support canvases, but graphical glitches are very likely
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by qaisjp »

Nixola wrote:I have to choose between canvases, spritebatches (that I don't like) and a strange way to draw that involves changing love.run, deleting love.draw and love.graphics.present(), otherwise it's quite slow (I didn't test it, but I have to draw 88*128 rectangles, it's not fast); I'm planning on making the third option available for those who don't support canvases, but graphical glitches are very likely
Try calculating the positions before hand, storing those positions in a table (tab={{pos..},{pos..}}) and then in the draw function loop the table and draw accordingly..
Lua is not an acronym.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by Nixola »

That's not a problem, 11264 calls to lg.rectangle per frame are
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Banoticus
Citizen
Posts: 60
Joined: Wed Apr 04, 2012 4:01 pm
Location: London

Re: Compose (Yet another LÖVE project...Will I ever finish o

Post by Banoticus »

AAAAAAAAAAAAA!!

My ear drums!

I like though.
Can you make the squares bigger and you can scroll to see all of them ( like in FL studio ). I think your program would sell more if it were so.

Very nice overall. :awesome:
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 28 guests