20 Jun '13 - 06:14 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Bass.NET WaveForm frame resolution limitation  (Read 496 times)
norbert
Posts: 33


« on: 14 Jan '12 - 08:42 »
Reply with quoteQuote

Is there a deeper reason why the Bass.NET WaveForm's FrameResolution is limited to 1 millisecond ? If one can adjust it, why not allowing the limit to be 1/(samplerate/1000) ie. 1 Frame = 1 Sample = 1Pixel  ?  E.g. I want the wave form of a short file (< 2  sec) to stretch to the available window witdh, which is sometimes not possible because of this 1 msec limit...
Logged
radio42
Posts: 4030


« Reply #1 on: 15 Jan '12 - 14:43 »
Reply with quoteQuote

No, there is no deeper reason, except, that a certain 'compression' seems useful as else the full PCM data would be used, which results in immense memory usage!
Logged
norbert
Posts: 33


« Reply #2 on: 15 Jan '12 - 17:48 »
Reply with quoteQuote

Sure a compression can be useful, but not in every situation, as explained above. A 10 seconds audio file will not take much memory if  every PCM value has its own pixel representation. Anyway, as the user/developer can decide how small the resolution is, it should be no problem to just allow the max. possible resolution.
A wave editor is one part of my current development and I want to give the user the possibility to do sample accurate (graphical) editing, so I would be really glad if I could continue using the built-in WaveForm class, and not having to implement my own wave renderer just because of this (arbitrary) limitation...
Logged
radio42
Posts: 4030


« Reply #3 on: 15 Jan '12 - 18:53 »
Reply with quoteQuote

I might reduce the limit.
However, as the 'Resolution' property is defined in seconds, I guess it can not be defined in samples directly, but to a 'smaller' minimum value, e.g. to 0,00005.
Logged
norbert
Posts: 33


« Reply #4 on: 16 Jan '12 - 07:50 »
Reply with quoteQuote

yes, or set no hardcoded minimum at all and just check,  after the Channel has been set, whether the minimum is lower than  1/(frequency/1000.0) msec, and if so, truncate it at this value.
Logged
BaseHead
Posts: 91


« Reply #5 on: 16 Jan '12 - 10:40 »
Reply with quoteQuote

I vote for a low minimum also   +1   Cool

We allow our users to zoom in on audio files and they get a bit pixelated  sometimes
More importantly if they are playing sounds like small kick drums or beeps then they look a bit funky now.
I would love to be able to code the option to get 10x finer if the sound is under 2 seconds long.

thx radio!

s>

My dream request would to have 4 and 6 channel drawing also.....Cool


Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines