Ooops
September 18, 2021, 05:55:36

Author Topic: My Music Editor  (Read 5527 times)

Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #120 on: August 08, 2021, 23:33:26 »
Update..

Added Track zoom in and out.. not simple ..but works..
...

Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #121 on: August 09, 2021, 23:36:51 »
Added Tracks Scroll

I have a zoom in to Tracks already made, but the problem is that i need to draw all samples again, and its slow..
Unless maybe ill make them high definition to begin with..
any other solution?




« Last Edit: August 10, 2021, 05:18:04 by Hardcoal »
...

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2441
Re: My Music Editor
« Reply #122 on: August 10, 2021, 06:22:34 »
okydoke....  Here's the best way to visualize any type of time line informations:
read through and go with this

1. First get drawing a line from 0 to 1 working like this


2. get your display to scale move whatever and the line goes from 0 to 1 correctly (clips, scales, etc)

3. what you now have is a base prototype you can fit any data into

lets just say the x and y are -10, 20 and the height is 50 and the width is 300
yhalf = height * 0.5
ymid = y + yhalf
you can draw a midline at x,ymid,x+width,ymid

xpos = x
for fpos = 0 to width
 frame = (fpos / width) * samplelength
 draw frame at xpos
 xpos += 1
next

if you really want to be efficient. the best thing is to create  a store for each sample of 256 positions. and fill this with the waveform. then use this as the drawing data - drawing 256 each time



Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #123 on: August 10, 2021, 07:11:26 »
thanks adam :)
...

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2441
Re: My Music Editor
« Reply #124 on: August 10, 2021, 07:53:45 »
if you think of everything as 0=start and 1=end. it becomes simple math to get positions, etc.

length = 300
end = 1
1*300 = 300

so 0.5 = 0.5 * 300 = 150.

using this we can reverse the concept
lets say a playhead now goes from 0 to 1
for any playhead in a sample. the position/frame is playhead * samplelength

and for any given position say 150 in a a sample of 300. pos/length = playhead = 150/300 = 0.5

I know that this is a small abstraction. but once you work in 0 to 1 and get used to it. there are all sorts of things that 'just' happen and you dont need to think about lengths anymore

lets assume that that your frame position doesn't move in units but in doubles and is moving at 0.5. if your sound generation system plays the frame, you are now playing at half speed.

Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #125 on: August 10, 2021, 08:34:07 »
I kinda get it ;)
...

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2441
Re: My Music Editor
« Reply #126 on: August 10, 2021, 10:48:29 »
ok.
lets say you have an array of 128 floats. with each float going from 0..1

we already have a playhead going from 0 to 1

so for any (playhead * 127) we can get a position (0to 127) which directly amps to the float arrray... with values from 0 to 1

Now... I'm just saying with that sort of data. you could feed the float results into the volume. so if the floats were all 1 then the volume would be at max. all at 0 then the volume would be off.

But... if the float array was a curve, or started at 0 quickly going to 1. staying there for most of the sample. then going back to 0 at the end....
You now have volume fade in/out...


so all you now need is to set channel.volume = volfade

Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #127 on: August 10, 2021, 13:48:07 »
Adam thanks for all your effort :)
I think i know how to make volume in and out..doesnt seem to complicated . i mean if i use the channelvolume..
but atm all i plan is to do just volume control to a track.. with no fade in and out..
all im doing is play with the idea of a mutli tracker..
i dont even know what I want..

all i know is i want to make music, and im not pleased with the tools i got..
I mean i cant yet find the right frame for me, but it will happen eventually..

I keep your posts in mind .. and i understand what you are saying.. and will use it when time comes..

you also gave me a great help on understanding math as a side effect
...

Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #128 on: August 13, 2021, 06:53:36 »
Added Volume control
...

Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #129 on: August 15, 2021, 17:55:37 »
Added Split Samples option

...

Offline Hardcoal

  • Hero Member
  • *****
  • Posts: 734
  • nothing is personal
Re: My Music Editor
« Reply #130 on: August 16, 2021, 03:55:54 »
Ive managed to make copy Tracks 100 times faster

Still much to work on speed, when considering lots of tracks
« Last Edit: August 16, 2021, 04:14:20 by Hardcoal »
...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal