Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-03 Thread Frank Barknecht
On Tue, Nov 02, 2010 at 06:13:49PM -0400, brandon zeeb wrote:
 Great!  Unfortunately, I'm not entirely sure how to realize this in Pd.  Can
 you help me out with a little example?

Like in the attachement maybe. The [pd roundit] doesn't do a floor, but a
real rounding. Rounding or flooring is at the core of bitcrusher effects as 
in the rj library, too, so you should have no problem to apply this to signals.

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__


quantized.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread Ludwig Maes
could you give examples of idealized input and output for cases 1-4?
im not sure I understand what exactly you want...

interested greetings!
Ludwig

On 1 November 2010 13:09, brandon zeeb zeeb.bran...@gmail.com wrote:
 Hey All,

 I've been burning my brain over this issue lately and I can't seem to come
 up with an elegant solution, and stay with me here as I attempt to explain
 it best I can.  For me and my needs, being able to quantize an arbitrary
 signal to any arbitrary series is the Holy Grail (and I'm not talking about
 simple table lookup!).

 I'm looking to quantize an incoming signal (or value) given a max and min
 quantization value and an arbitrary curve.  Think quantization of note
 events to a series of note lengths or your standard bitcrush algorithm, it's
 pretty much the same.  The arbitrary curve should influence the degree to
 which the bitcrush algorithm is applied to the signal such that one could
 have less quantization at smaller values of the input signal, and greater
 quantization and larger values (or vice versa).  Simple table-lookup is
 insufficient as it requires you to pre-define a maximum input signal
 amount.  I'm willing to waive this requirement if an implementation is not
 possible without it.

 This will be used in the following circumstances:

 To quantize envelopes signals to any arbitrary series (say !, Fibonacci,
 x^2, 2^x, etc)
 To quantize signal loop length values to an arbitrary series of note values
 (say 1/16, 1/8, 1/2, 1/1)
 To apply non-linear bitcrushing to a signal such that higher values are
 expressed with less of an effect than smaller values
 To quantize pitch events to a pre-defined series


 Is this making sense?

 My attempts thus far has extended the RjDj bitcrush abstraction with mild
 success.  I can recreate the effect but the output signal bears too many
 artifacts from the input signal (ie: the curve retains part of it's original
 slope from the input signal and is not flattened or held until the next
 value).

 Thanks,
 ~Brandon

 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread brandon zeeb
I've attached my best attempt at recreating this effect, the attached PNG
will be used as a reference.

Given the distance d1 and d2, these distances are usually identical in a
traditional bitcrush or simple quantization.  I would like to be able to
vary the distance between points of an incoming signal such that the
distance between points is a function of a given quantization value, the
current Y value, AND a given quantization curve.

As a first step (and illustrated in the attached PNG), smaller values of Y
will produce a more pronounced quantization given a x^2 quantization curve
while larger values of Y will produce a smaller distance between steps.

Ideas?

~Brandon

On Tue, Nov 2, 2010 at 10:47 AM, Ludwig Maes ludwig.m...@gmail.com wrote:

 could you give examples of idealized input and output for cases 1-4?
 im not sure I understand what exactly you want...

 interested greetings!
 Ludwig

 On 1 November 2010 13:09, brandon zeeb zeeb.bran...@gmail.com wrote:
  Hey All,
 
  I've been burning my brain over this issue lately and I can't seem to
 come
  up with an elegant solution, and stay with me here as I attempt to
 explain
  it best I can.  For me and my needs, being able to quantize an arbitrary
  signal to any arbitrary series is the Holy Grail (and I'm not talking
 about
  simple table lookup!).
 
  I'm looking to quantize an incoming signal (or value) given a max and min
  quantization value and an arbitrary curve.  Think quantization of note
  events to a series of note lengths or your standard bitcrush algorithm,
 it's
  pretty much the same.  The arbitrary curve should influence the degree to
  which the bitcrush algorithm is applied to the signal such that one could
  have less quantization at smaller values of the input signal, and greater
  quantization and larger values (or vice versa).  Simple table-lookup is
  insufficient as it requires you to pre-define a maximum input signal
  amount.  I'm willing to waive this requirement if an implementation is
 not
  possible without it.
 
  This will be used in the following circumstances:
 
  To quantize envelopes signals to any arbitrary series (say !, Fibonacci,
  x^2, 2^x, etc)
  To quantize signal loop length values to an arbitrary series of note
 values
  (say 1/16, 1/8, 1/2, 1/1)
  To apply non-linear bitcrushing to a signal such that higher values are
  expressed with less of an effect than smaller values
  To quantize pitch events to a pre-defined series
 
 
  Is this making sense?
 
  My attempts thus far has extended the RjDj bitcrush abstraction with mild
  success.  I can recreate the effect but the output signal bears too many
  artifacts from the input signal (ie: the curve retains part of it's
 original
  slope from the input signal and is not flattened or held until the next
  value).
 
  Thanks,
  ~Brandon
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list
 
 




-- 
Brandon Zeeb
Columbus, Ohio
attachment: my-crush-ex.png

my-crush.pd
Description: Binary data
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread brandon zeeb
This is even better.  If I could minimize the jumps around Y = 0.5 to -0.5
It'll be exactly what I'm looking for... or a start at least.

Do you see what I mean now?  See how the amount of quantization changes with
Y and a minimum quantization value?

I think I'm getting towards the answer now...

-- 
Brandon Zeeb
Columbus, Ohio
attachment: my-crush2-ex.png

my-crush2.pd
Description: Binary data
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread Ludwig Maes
So you want amplitude 'a' dependant quantization size 'q' ? take your
chosen q(a); in your example it seems you want a simple line:
q=q(0)-k*a;
define f(a) as integral of 1/q from a=0 to a; also calculate the
inverse of f(a) i.e. a(f);

now for each sample do: out=a(round(f(in))) where round is any floor
or the like...

have fun!

ps:

in your example: q=q0-k*a with for example q(0)=0.001 and
q(0.8)=0.0001: q:=0.001-0.0009/0.8*a
then f=2558.427881-.11*ln(10.-9.*a)
and inverse=easy


On 2 November 2010 19:20, Ludwig Maes ludwig.m...@gmail.com wrote:
 This is pretty easy actually, I use such things mostly to guide my
 rhythmical quantization...

 On 2 November 2010 19:19, brandon zeeb zeeb.bran...@gmail.com wrote:
 This is even better.  If I could minimize the jumps around Y = 0.5 to -0.5
 It'll be exactly what I'm looking for... or a start at least.

 Do you see what I mean now?  See how the amount of quantization changes with
 Y and a minimum quantization value?

 I think I'm getting towards the answer now...

 --
 Brandon Zeeb
 Columbus, Ohio




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread Ludwig Maes
The reason you use the inverse is so that the amplitude remains the
same albeit quantized. The reason we use another function before
flooring is to distritube the floor levels.But afterwards we need to
bring the values back to their original place

On 2 November 2010 19:37, Ludwig Maes ludwig.m...@gmail.com wrote:
 So you want amplitude 'a' dependant quantization size 'q' ? take your
 chosen q(a); in your example it seems you want a simple line:
 q=q(0)-k*a;
 define f(a) as integral of 1/q from a=0 to a; also calculate the
 inverse of f(a) i.e. a(f);

 now for each sample do: out=a(round(f(in))) where round is any floor
 or the like...

 have fun!

 ps:

 in your example: q=q0-k*a with for example q(0)=0.001 and
 q(0.8)=0.0001: q:=0.001-0.0009/0.8*a
 then f=2558.427881-.11*ln(10.-9.*a)
 and inverse=easy


 On 2 November 2010 19:20, Ludwig Maes ludwig.m...@gmail.com wrote:
 This is pretty easy actually, I use such things mostly to guide my
 rhythmical quantization...

 On 2 November 2010 19:19, brandon zeeb zeeb.bran...@gmail.com wrote:
 This is even better.  If I could minimize the jumps around Y = 0.5 to -0.5
 It'll be exactly what I'm looking for... or a start at least.

 Do you see what I mean now?  See how the amount of quantization changes with
 Y and a minimum quantization value?

 I think I'm getting towards the answer now...

 --
 Brandon Zeeb
 Columbus, Ohio





___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread Ludwig Maes
And we want f' to be 1 (integer step) / (per) quantization size (for
that amplitude)


On 2 November 2010 19:41, Ludwig Maes ludwig.m...@gmail.com wrote:
 The reason you use the inverse is so that the amplitude remains the
 same albeit quantized. The reason we use another function before
 flooring is to distritube the floor levels.But afterwards we need to
 bring the values back to their original place

 On 2 November 2010 19:37, Ludwig Maes ludwig.m...@gmail.com wrote:
 So you want amplitude 'a' dependant quantization size 'q' ? take your
 chosen q(a); in your example it seems you want a simple line:
 q=q(0)-k*a;
 define f(a) as integral of 1/q from a=0 to a; also calculate the
 inverse of f(a) i.e. a(f);

 now for each sample do: out=a(round(f(in))) where round is any floor
 or the like...

 have fun!

 ps:

 in your example: q=q0-k*a with for example q(0)=0.001 and
 q(0.8)=0.0001: q:=0.001-0.0009/0.8*a
 then f=2558.427881-.11*ln(10.-9.*a)
 and inverse=easy


 On 2 November 2010 19:20, Ludwig Maes ludwig.m...@gmail.com wrote:
 This is pretty easy actually, I use such things mostly to guide my
 rhythmical quantization...

 On 2 November 2010 19:19, brandon zeeb zeeb.bran...@gmail.com wrote:
 This is even better.  If I could minimize the jumps around Y = 0.5 to -0.5
 It'll be exactly what I'm looking for... or a start at least.

 Do you see what I mean now?  See how the amount of quantization changes 
 with
 Y and a minimum quantization value?

 I think I'm getting towards the answer now...

 --
 Brandon Zeeb
 Columbus, Ohio






___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread Ludwig Maes
Watch out in my numeric example, I was a bit careless and the q I
chose continues to increase for more and more negative amplitudes!

On 2 November 2010 19:44, Ludwig Maes ludwig.m...@gmail.com wrote:
 And we want f' to be 1 (integer step) / (per) quantization size (for
 that amplitude)


 On 2 November 2010 19:41, Ludwig Maes ludwig.m...@gmail.com wrote:
 The reason you use the inverse is so that the amplitude remains the
 same albeit quantized. The reason we use another function before
 flooring is to distritube the floor levels.But afterwards we need to
 bring the values back to their original place

 On 2 November 2010 19:37, Ludwig Maes ludwig.m...@gmail.com wrote:
 So you want amplitude 'a' dependant quantization size 'q' ? take your
 chosen q(a); in your example it seems you want a simple line:
 q=q(0)-k*a;
 define f(a) as integral of 1/q from a=0 to a; also calculate the
 inverse of f(a) i.e. a(f);

 now for each sample do: out=a(round(f(in))) where round is any floor
 or the like...

 have fun!

 ps:

 in your example: q=q0-k*a with for example q(0)=0.001 and
 q(0.8)=0.0001: q:=0.001-0.0009/0.8*a
 then f=2558.427881-.11*ln(10.-9.*a)
 and inverse=easy


 On 2 November 2010 19:20, Ludwig Maes ludwig.m...@gmail.com wrote:
 This is pretty easy actually, I use such things mostly to guide my
 rhythmical quantization...

 On 2 November 2010 19:19, brandon zeeb zeeb.bran...@gmail.com wrote:
 This is even better.  If I could minimize the jumps around Y = 0.5 to -0.5
 It'll be exactly what I'm looking for... or a start at least.

 Do you see what I mean now?  See how the amount of quantization changes 
 with
 Y and a minimum quantization value?

 I think I'm getting towards the answer now...

 --
 Brandon Zeeb
 Columbus, Ohio







___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Non-Linear Quantization / Bitcrush

2010-11-02 Thread brandon zeeb
Great!  Unfortunately, I'm not entirely sure how to realize this in Pd.  Can
you help me out with a little example?

Thanks

On Tue, Nov 2, 2010 at 2:37 PM, Ludwig Maes ludwig.m...@gmail.com wrote:

 So you want amplitude 'a' dependant quantization size 'q' ? take your
 chosen q(a); in your example it seems you want a simple line:
 q=q(0)-k*a;
 define f(a) as integral of 1/q from a=0 to a; also calculate the
 inverse of f(a) i.e. a(f);

 now for each sample do: out=a(round(f(in))) where round is any floor
 or the like...

 have fun!

 ps:

 in your example: q=q0-k*a with for example q(0)=0.001 and
 q(0.8)=0.0001: q:=0.001-0.0009/0.8*a
 then f=2558.427881-.11*ln(10.-9.*a)
 and inverse=easy


 On 2 November 2010 19:20, Ludwig Maes ludwig.m...@gmail.com wrote:
  This is pretty easy actually, I use such things mostly to guide my
  rhythmical quantization...
 
  On 2 November 2010 19:19, brandon zeeb zeeb.bran...@gmail.com wrote:
  This is even better.  If I could minimize the jumps around Y = 0.5 to
 -0.5
  It'll be exactly what I'm looking for... or a start at least.
 
  Do you see what I mean now?  See how the amount of quantization changes
 with
  Y and a minimum quantization value?
 
  I think I'm getting towards the answer now...
 
  --
  Brandon Zeeb
  Columbus, Ohio
 
 
 




-- 
Brandon Zeeb
Columbus, Ohio
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Non-Linear Quantization / Bitcrush

2010-11-01 Thread brandon zeeb
Hey All,

I've been burning my brain over this issue lately and I can't seem to come
up with an elegant solution, and stay with me here as I attempt to explain
it best I can.  For me and my needs, being able to quantize an arbitrary
signal to any arbitrary series is the Holy Grail (and I'm not talking about
simple table lookup!).

I'm looking to quantize an incoming signal (or value) given a max and min
quantization value and an arbitrary curve.  Think quantization of note
events to a series of note lengths or your standard bitcrush algorithm, it's
pretty much the same.  The arbitrary curve should influence the degree to
which the bitcrush algorithm is applied to the signal such that one could
have less quantization at smaller values of the input signal, and greater
quantization and larger values (or vice versa).  Simple table-lookup is
insufficient as it requires you to pre-define a maximum input signal
amount.  I'm willing to waive this requirement if an implementation is not
possible without it.

This will be used in the following circumstances:

   1. To quantize envelopes signals to any arbitrary series (say !,
   Fibonacci, x^2, 2^x, etc)
   2. To quantize signal loop length values to an arbitrary series of note
   values (say 1/16, 1/8, 1/2, 1/1)
   3. To apply non-linear bitcrushing to a signal such that higher values
   are expressed with less of an effect than smaller values
   4. To quantize pitch events to a pre-defined series


Is this making sense?

My attempts thus far has extended the RjDj bitcrush abstraction with mild
success.  I can recreate the effect but the output signal bears too many
artifacts from the input signal (ie: the curve retains part of it's original
slope from the input signal and is not flattened or held until the next
value).

Thanks,
~Brandon
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list