Csound Csound-dev Csound-tekno Search About

[Csnd] Serial ok on windows, now... more than 8 bits ?

Date2011-12-06 14:19
FromOeyvind Brandtsegg
Subject[Csnd] Serial ok on windows, now... more than 8 bits ?
Hello

I finally got around to testing the serial opcodes on windows,
it works fine, excellent!

Now, I would like to receive values with a higher resolutoion than 8
bits from the arduino.
How would I go about to do this ?
I could think of combining 2 bytes into a 16 bit value, and use a (0
or 32767) value as a "delimiter value" but how should I ensure that I
synchronize correctly (read the correct 2 bytes together)?
matt?

best
Oeyvind

Date2011-12-06 14:37
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] Serial ok on windows, now... more than 8 bits ?
> Hello
>
> I finally got around to testing the serial opcodes on windows,
> it works fine, excellent!
>

I cannot convey how much that is a relief to me!

> Now, I would like to receive values with a higher resolutoion than 8
> bits from the arduino.
> How would I go about to do this ?
> I could think of combining 2 bytes into a 16 bit value, and use a (0
> or 32767) value as a "delimiter value" but how should I ensure that I
> synchronize correctly (read the correct 2 bytes together)?
> matt?
>

You have two potential routes.

1: Take two 8-bit quantities and construcyt a 16bit (or if preferred 4
bytes to a 32bit thing)

2: Use the MIDI hack where bottom 7 bits are data and if tne top bit is
set expect a further 7 bits,... and repeat,  This gives tighter coding if
you expect numbers to be small mostly, but at the cost of reconstruction
and coding

==John ff




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-12-06 14:46
FromOeyvind Brandtsegg
SubjectRe: [Csnd] Serial ok on windows, now... more than 8 bits ?
Thanks a lot,
and it seems reasonable for me to do the 7-bit route as the values I'm
trying to transmit are actually 12 bit.
all good
Oeyvind

2011/12/6  :
>> Hello
>>
>> I finally got around to testing the serial opcodes on windows,
>> it works fine, excellent!
>>
>
> I cannot convey how much that is a relief to me!
>
>> Now, I would like to receive values with a higher resolutoion than 8
>> bits from the arduino.
>> How would I go about to do this ?
>> I could think of combining 2 bytes into a 16 bit value, and use a (0
>> or 32767) value as a "delimiter value" but how should I ensure that I
>> synchronize correctly (read the correct 2 bytes together)?
>> matt?
>>
>
> You have two potential routes.
>
> 1: Take two 8-bit quantities and construcyt a 16bit (or if preferred 4
> bytes to a 32bit thing)
>
> 2: Use the MIDI hack where bottom 7 bits are data and if tne top bit is
> set expect a further 7 bits,... and repeat,  This gives tighter coding if
> you expect numbers to be small mostly, but at the cost of reconstruction
> and coding
>
> ==John ff
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-12-06 14:51
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] Serial ok on windows, now... more than 8 bits ?
> Thanks a lot,
> and it seems reasonable for me to do the 7-bit route as the values I'm
> trying to transmit are actually 12 bit.
> all good
> Oeyvind
>

You will have to think about negative numbers.  is 01111111 really -1
(i.e. sign extended) if is it really 127.  Might be easiest to treat as
sign extending -- but that depends on where you are expecting to transmit
negative numbers

==John ff



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-12-06 14:56
FromOeyvind Brandtsegg
SubjectRe: [Csnd] Serial ok on windows, now... more than 8 bits ?
Oh, that'll be fine, the values are unipolar at this stage.
Oeyvind


2011/12/6  :
>> Thanks a lot,
>> and it seems reasonable for me to do the 7-bit route as the values I'm
>> trying to transmit are actually 12 bit.
>> all good
>> Oeyvind
>>
>
> You will have to think about negative numbers.  is 01111111 really -1
> (i.e. sign extended) if is it really 127.  Might be easiest to treat as
> sign extending -- but that depends on where you are expecting to transmit
> negative numbers
>
> ==John ff
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-12-06 15:56
FromVictor Lazzarini
SubjectRe: [Csnd] Serial ok on windows, now... more than 8 bits ?
When this is all done, let us hear your bridge sing, please. Jpff will be particularly pleased I'm sure.

Victor
On 6 Dec 2011, at 14:56, Oeyvind Brandtsegg wrote:

> Oh, that'll be fine, the values are unipolar at this stage.
> Oeyvind
> 
> 
> 2011/12/6  :
>>> Thanks a lot,
>>> and it seems reasonable for me to do the 7-bit route as the values I'm
>>> trying to transmit are actually 12 bit.
>>> all good
>>> Oeyvind
>>> 
>> 
>> You will have to think about negative numbers.  is 01111111 really -1
>> (i.e. sign extended) if is it really 127.  Might be easiest to treat as
>> sign extending -- but that depends on where you are expecting to transmit
>> negative numbers
>> 
>> ==John ff
>> 
>> 
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
> 
> 
> 
> -- 
> 
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-12-07 06:56
FromOeyvind Brandtsegg
SubjectRe: [Csnd] Serial ok on windows, now... more than 8 bits ?
Yes, of course :-) I'm looking forward to hear what you think of it.
I will release a composed piece based on recorded sounds from the
bridge late December or early January.

There might be a smaller scale "pilot" project on a bridge in
Trondheim in September 2012,
and I hope to finish the large bridge project by August 2013.

best

2011/12/6 Victor Lazzarini :
> When this is all done, let us hear your bridge sing, please. Jpff will be particularly pleased I'm sure.
>
> Victor
> On 6 Dec 2011, at 14:56, Oeyvind Brandtsegg wrote:
>
>> Oh, that'll be fine, the values are unipolar at this stage.
>> Oeyvind
>>
>>
>> 2011/12/6  :
>>>> Thanks a lot,
>>>> and it seems reasonable for me to do the 7-bit route as the values I'm
>>>> trying to transmit are actually 12 bit.
>>>> all good
>>>> Oeyvind
>>>>
>>>
>>> You will have to think about negative numbers.  is 01111111 really -1
>>> (i.e. sign extended) if is it really 127.  Might be easiest to treat as
>>> sign extending -- but that depends on where you are expecting to transmit
>>> negative numbers
>>>
>>> ==John ff
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>>
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"