[Mixxx-devel] absolute position ?

2013-07-06 Thread petah
What message should be used to set the absolute position of the virtual needle 
of a loaded track given an absolute time position, f.ex. 2mins 34secs 
567millisecs?

I went through all the relevant docs (I think), incl. controls and HID mappings 
and didn't find a clear solution.

I need to match an analog CDJ's time display with Mixxx's via a timecode CD 
using absolute timestamps (4 tracks x 15min), i.e. time scale between CDJ/Mixxx 
needs to be 1:1 and clamp, not stretch.

F.ex. vinylcontrol_mode is a 3-way switch, one being absolute, but I don't 
see the set absolute time message. playPosition is scaled over the length 
of the track loaded in mixxx, which won't match a timecode CD's track. 
scratch2 affects the absolute speed, hence the relative position.

The absolute time position needs to have at least 22-bit resolution so a gentle 
pitch bend can go through the engine via that cursor position and behave as 
expected, i.e. if any scaling/compression is applied along the way it wouldn't 
chop off the lower bits. 

It's just to control track position. Precision is critical but right now 
latency isn't.

thx,

-- p

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel


Re: [Mixxx-devel] absolute position ?

2013-07-06 Thread Owen Williams
I'm confused, what are you trying to do?  For vinylcontrol absolute
mode, we mostly use the pitch value and then nudge the speed up or down
if it drifts too far from the reported timecode position.  For CDs, if
it's more than .1 seconds off then we just seek to that position.  I
don't really see the point of having 22 bit resolution.

owen

On Sat, 2013-07-06 at 11:56 +0200, petah wrote:
 What message should be used to set the absolute position of the virtual 
 needle of a loaded track given an absolute time position, f.ex. 2mins 34secs 
 567millisecs?
 
 I went through all the relevant docs (I think), incl. controls and HID 
 mappings and didn't find a clear solution.
 
 I need to match an analog CDJ's time display with Mixxx's via a timecode CD 
 using absolute timestamps (4 tracks x 15min), i.e. time scale between 
 CDJ/Mixxx needs to be 1:1 and clamp, not stretch.
 
 F.ex. vinylcontrol_mode is a 3-way switch, one being absolute, but I don't 
 see the set absolute time message. playPosition is scaled over the length 
 of the track loaded in mixxx, which won't match a timecode CD's track. 
 scratch2 affects the absolute speed, hence the relative position.
 
 The absolute time position needs to have at least 22-bit resolution so a 
 gentle pitch bend can go through the engine via that cursor position and 
 behave as expected, i.e. if any scaling/compression is applied along the way 
 it wouldn't chop off the lower bits. 
 
 It's just to control track position. Precision is critical but right now 
 latency isn't.
 
 thx,
 
 -- p
 
 --
 This SF.net email is sponsored by Windows:
 
 Build for Windows Store.
 
 http://p.sf.net/sfu/windows-dev2dev
 ___
 Get Mixxx, the #1 Free MP3 DJ Mixing software Today
 http://mixxx.org
 
 
 Mixxx-devel mailing list
 Mixxx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mixxx-devel
 



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel


Re: [Mixxx-devel] absolute position ?

2013-07-06 Thread petah
On Sat, 06 Jul 2013 11:14:13 -0400
Owen Williams owilliams-opwvymzfgylytjvyw6y...@public.gmane.org wrote:
 I'm confused, what are you trying to do? For vinylcontrol absolute
 mode, we mostly use the pitch value and then nudge the speed up or down
 if it drifts too far from the reported timecode position.For CDs, if
 it's more than .1 seconds off then we just seek to that position.  I
 don't really see the point of having 22 bit resolution.

22-bits is the maximum resolution the CDJ timecode returns for a single-track 
CD. On a 4-track CD a timestamp is 2.38ms or a worst-case latency of ~5ms. OTOH 
nudging +/- 0.1 second is 100ms or 20x worse.

Dropping seek commands based on acceptable drift is fine on full-resolution 
incoming timecode at the receiver end, but doing roundtrips and diffs to reach 
an absolute position makes no sense if the timecode is absolute to begin with. 
I'd turn the comment around: I don't see the point of truncating bits in the 
protocol to later try recovering them by chasing the needle :)

-- p

 On Sat, 2013-07-06 at 11:56 +0200, petah wrote:
  What message should be used to set the absolute position of the virtual 
  needle of a loaded track given an absolute time position, f.ex. 2mins 
  34secs 567millisecs?
  
  I went through all the relevant docs (I think), incl. controls and HID 
  mappings and didn't find a clear solution.
  
  I need to match an analog CDJ's time display with Mixxx's via a timecode CD 
  using absolute timestamps (4 tracks x 15min), i.e. time scale between 
  CDJ/Mixxx needs to be 1:1 and clamp, not stretch.
  
  F.ex. vinylcontrol_mode is a 3-way switch, one being absolute, but I 
  don't see the set absolute time message. playPosition is scaled over 
  the length of the track loaded in mixxx, which won't match a timecode CD's 
  track. scratch2 affects the absolute speed, hence the relative position.
  
  The absolute time position needs to have at least 22-bit resolution so a 
  gentle pitch bend can go through the engine via that cursor position and 
  behave as expected, i.e. if any scaling/compression is applied along the 
  way it wouldn't chop off the lower bits. 
  
  It's just to control track position. Precision is critical but right now 
  latency isn't.
  
  thx,
  
  -- p
  
  --
  This SF.net email is sponsored by Windows:
  
  Build for Windows Store.
  
  http://p.sf.net/sfu/windows-dev2dev
  ___
  Get Mixxx, the #1 Free MP3 DJ Mixing software Today
  http://mixxx.org
  
  
  Mixxx-devel mailing list
  mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
  https://lists.sourceforge.net/lists/listinfo/mixxx-devel
  
 
 
 
 --
 This SF.net email is sponsored by Windows:
 
 Build for Windows Store.
 
 http://p.sf.net/sfu/windows-dev2dev
 ___
 Get Mixxx, the #1 Free MP3 DJ Mixing software Today
 http://mixxx.org
 
 
 Mixxx-devel mailing list
 mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
 https://lists.sourceforge.net/lists/listinfo/mixxx-devel
 


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel


Re: [Mixxx-devel] absolute position ?

2013-07-06 Thread petah
On Sat, 06 Jul 2013 11:14:13 -0400
Owen Williams owilliams-opwvymzfgylytjvyw6y...@public.gmane.org wrote:
 I'm confused, what are you trying to do? For vinylcontrol absolute
 mode, we mostly use the pitch value and then nudge the speed up or down
 if it drifts too far from the reported timecode position.For CDs, if
 it's more than .1 seconds off then we just seek to that position.  I
 don't really see the point of having 22 bit resolution.

22-bits is the maximum resolution the CDJ timecode returns for a single-track 
CD. On a 4-track CD a timestamp is 2.38ms or a worst-case latency of ~5ms. OTOH 
nudging +/- 0.1 second is 100ms or 20x worse.

Dropping seek commands based on acceptable drift is fine on full-resolution 
incoming timecode at the receiver end, but doing roundtrips and diffs to reach 
an absolute position makes no sense if the timecode is absolute to begin with. 
I'd turn the comment around: I don't see the point of truncating bits in the 
protocol to later try recovering them by chasing the needle :)

-- p

 On Sat, 2013-07-06 at 11:56 +0200, petah wrote:
  What message should be used to set the absolute position of the virtual 
  needle of a loaded track given an absolute time position, f.ex. 2mins 
  34secs 567millisecs?
  
  I went through all the relevant docs (I think), incl. controls and HID 
  mappings and didn't find a clear solution.
  
  I need to match an analog CDJ's time display with Mixxx's via a timecode CD 
  using absolute timestamps (4 tracks x 15min), i.e. time scale between 
  CDJ/Mixxx needs to be 1:1 and clamp, not stretch.
  
  F.ex. vinylcontrol_mode is a 3-way switch, one being absolute, but I 
  don't see the set absolute time message. playPosition is scaled over 
  the length of the track loaded in mixxx, which won't match a timecode CD's 
  track. scratch2 affects the absolute speed, hence the relative position.
  
  The absolute time position needs to have at least 22-bit resolution so a 
  gentle pitch bend can go through the engine via that cursor position and 
  behave as expected, i.e. if any scaling/compression is applied along the 
  way it wouldn't chop off the lower bits. 
  
  It's just to control track position. Precision is critical but right now 
  latency isn't.
  
  thx,
  
  -- p
  
  --
  This SF.net email is sponsored by Windows:
  
  Build for Windows Store.
  
  http://p.sf.net/sfu/windows-dev2dev
  ___
  Get Mixxx, the #1 Free MP3 DJ Mixing software Today
  http://mixxx.org
  
  
  Mixxx-devel mailing list
  mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
  https://lists.sourceforge.net/lists/listinfo/mixxx-devel
  
 
 
 
 --
 This SF.net email is sponsored by Windows:
 
 Build for Windows Store.
 
 http://p.sf.net/sfu/windows-dev2dev
 ___
 Get Mixxx, the #1 Free MP3 DJ Mixing software Today
 http://mixxx.org
 
 
 Mixxx-devel mailing list
 mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
 https://lists.sourceforge.net/lists/listinfo/mixxx-devel
 


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel


Re: [Mixxx-devel] help! how to get data source for supporting geting controller presets from web?

2013-07-06 Thread Daniel Schürmann
Hi 魏欣

Here some thought. But apologize if they are all rubbish, because I did not
follow your work that close.

I am not sure if I get your point. It is correct that you are trying to put
the xml mapping file logical content in you database? Is the mapping xml
file generated from the database later?

If so, I am not in favor with this idea, because it will put additional
limitations to the Mixxx and Mapping development. It is possible to store
the mapping files as they are it is into the database?

If not, we Mixxx have a parser for the xml mappings. Did you have a look at
it? It stores the data from the xml in structures hand hash tables. Maybe
it is a good idea to split this part into a separate so/dll and add your
database code to it. This way we can maintain all midi mapping code at one
place. Is it possible to use C++ shared obejcts within the backstage
server?

Hope that helps!

Kind regards,

Daniel




2013/7/6 魏欣 weixind...@gmail.com

 Hi,
 I am working on providing interfaces for geting forum presets from server.
 Now I have deployed a server on my own computer ,built the database and
 been able to get database data from mixxx client through Tastypie API. But
 I find a problem that I have been ignored. It is how and where  I can get
 presets data for filling server database.
 Now I have an idea that I can write a script parsing xml files in
 '/res/controllers/', and use these data to fill in server database tables.
 And for mixxx client, in order to support search from local and web server,
 we also should build tables at local database for presets. During
 initialization, Mixxx scans all the files in  '/res/controllers/' and
 exports the presets info data into local database. The process that users
 search and download presets from web server is just to update local
 database. But I guess a problem is that exporting data from xml files may
 be incomplete, and some preset xml file maybe need some changes.

 Can you give me some suggestions?

 --
 Best Regards!
 Xin Wei



 --
 This SF.net email is sponsored by Windows:

 Build for Windows Store.

 http://p.sf.net/sfu/windows-dev2dev
 ___
 Get Mixxx, the #1 Free MP3 DJ Mixing software Today
 http://mixxx.org


 Mixxx-devel mailing list
 Mixxx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mixxx-devel

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Re: [Mixxx-devel] absolute position ?

2013-07-06 Thread Owen Williams
Like I said, we do playback based on pitch, not position.  Is there a
problem you're trying to solve?  Is there something wrong with how
absolute position playback is working?

On Sat, 2013-07-06 at 19:08 +0200, petah wrote:
 On Sat, 06 Jul 2013 11:14:13 -0400
 Owen Williams owilliams-opwvymzfgylytjvyw6y...@public.gmane.org wrote:
  I'm confused, what are you trying to do? For vinylcontrol absolute
  mode, we mostly use the pitch value and then nudge the speed up or down
  if it drifts too far from the reported timecode position.For CDs, if
  it's more than .1 seconds off then we just seek to that position.  I
  don't really see the point of having 22 bit resolution.
 
 22-bits is the maximum resolution the CDJ timecode returns for a
 single-track CD. On a 4-track CD a timestamp is 2.38ms or a worst-case
 latency of ~5ms. OTOH nudging +/- 0.1 second is 100ms or 20x worse.
 
 Dropping seek commands based on acceptable drift is fine on
 full-resolution incoming timecode at the receiver end, but doing
 roundtrips and diffs to reach an absolute position makes no sense if
 the timecode is absolute to begin with. I'd turn the comment around: I
 don't see the point of truncating bits in the protocol to later try
 recovering them by chasing the needle :)
 
 -- p
 
  On Sat, 2013-07-06 at 11:56 +0200, petah wrote:
   What message should be used to set the absolute position of the virtual 
   needle of a loaded track given an absolute time position, f.ex. 2mins 
   34secs 567millisecs?
   
   I went through all the relevant docs (I think), incl. controls and HID 
   mappings and didn't find a clear solution.
   
   I need to match an analog CDJ's time display with Mixxx's via a timecode 
   CD using absolute timestamps (4 tracks x 15min), i.e. time scale between 
   CDJ/Mixxx needs to be 1:1 and clamp, not stretch.
   
   F.ex. vinylcontrol_mode is a 3-way switch, one being absolute, but I 
   don't see the set absolute time message. playPosition is scaled over 
   the length of the track loaded in mixxx, which won't match a timecode 
   CD's track. scratch2 affects the absolute speed, hence the relative 
   position.
   
   The absolute time position needs to have at least 22-bit resolution so a 
   gentle pitch bend can go through the engine via that cursor position and 
   behave as expected, i.e. if any scaling/compression is applied along the 
   way it wouldn't chop off the lower bits. 
   
   It's just to control track position. Precision is critical but right now 
   latency isn't.
   
   thx,
   
   -- p
   
   --
   This SF.net email is sponsored by Windows:
   
   Build for Windows Store.
   
   http://p.sf.net/sfu/windows-dev2dev
   ___
   Get Mixxx, the #1 Free MP3 DJ Mixing software Today
   http://mixxx.org
   
   
   Mixxx-devel mailing list
   mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
   https://lists.sourceforge.net/lists/listinfo/mixxx-devel
   
  
  
  
  --
  This SF.net email is sponsored by Windows:
  
  Build for Windows Store.
  
  http://p.sf.net/sfu/windows-dev2dev
  ___
  Get Mixxx, the #1 Free MP3 DJ Mixing software Today
  http://mixxx.org
  
  
  Mixxx-devel mailing list
  mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
  https://lists.sourceforge.net/lists/listinfo/mixxx-devel
  
 
 
 --
 This SF.net email is sponsored by Windows:
 
 Build for Windows Store.
 
 http://p.sf.net/sfu/windows-dev2dev
 ___
 Get Mixxx, the #1 Free MP3 DJ Mixing software Today
 http://mixxx.org
 
 
 Mixxx-devel mailing list
 Mixxx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mixxx-devel
 



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel


Re: [Mixxx-devel] help! how to get data source for supporting geting controller presets from web?

2013-07-06 Thread 魏欣
Hi Daniel
Thanks a lot!

2013/7/7 Daniel Schürmann dasch...@mixxx.org

 Hi 魏欣

 Here some thought. But apologize if they are all rubbish, because I did
 not follow your work that close.

 I am not sure if I get your point. It is correct that you are trying to
 put the xml mapping file logical content in you database?

Yes, I am.

 Is the mapping xml file generated from the database later?

If so, I am not in favor with this idea, because it will put additional
 limitations to the Mixxx and Mapping development. It is possible to store
 the mapping files as they are it is into the database?

 No, I just want to put the xml mapping file logical content in my
database, but it is not enough. Another two items, presets certification
status and controller cover picture is necessary for me to implement my
search function I have designed.   I know that it's better not
put additional limitations to the Mixxx and Mapping development, So I have
an idea that I build another xml file which store preset name(this is
same as name in xml mapping file), preset pid, cover pictureand
certification status(these three items are necessary for me and going to
add into my database. ) of all the preset in /res/controllers. This xml
file will be parsed  and the content will be pulled into my database at the
same time with the xml mapping file logical content pulled into my
database.  How about this way? In fact I think this way is a bit
wierd, presets certification status and controller cover picture shoud
be same as scriptfiles stored in xml mapping file in logic.

 If not, we Mixxx have a parser for the xml mappings. Did you have a look
 at it? It stores the data from the xml in structures hand hash tables.
 Maybe it is a good idea to split this part into a separate so/dll and add
 your database code to it. This way we can maintain all midi mapping code at
 one place.

I have readed the parser code. I have planed to make use of it to pull xml
mapping file content into my database.

 Is it possible to use C++ shared obejcts within the backstage server?

 I have written a parser script in Python within the backstage server. Is
it necessary to use C++? This script file will be run only when we deploy
our backstage server.

Hope that helps!

Thanks again!


 Kind regards,

 Daniel



Here I give a list of columns of preset table and file storage table in my
planed client database.
preset table 
1) pid.(uuid. this should stay the same with server side database)
2) author.
3) url. Its values may be null for preset build by mixxx, a forums link
for preset coming from mixxx forum, and a wiki link for preset coming
from mixxx wiki.
4) description.
5) preset_source. If xml mapping preset file include forums, its value is
forums and if include wiki, its value is wiki, otherwise its value is
mixxx.
6) preset_status. Its values are certificated,uncertificated, and
certificating.
7) mixxx_version
8) preset_name
9) controller_name
10) schema_version
 file storage table
1) fid(auto increment)
2) pid(Foreign key)
3) file type. its value are xml,js,png(show covers for search results)
4) file name
5) directory

The contents in red are what I can not get from our current xml mapping
preset file.

Best Regards,
weixin



 2013/7/6 魏欣 weixind...@gmail.com

 Hi,
 I am working on providing interfaces for geting forum presets from
 server. Now I have deployed a server on my own computer ,built the database
 and been able to get database data from mixxx client through Tastypie API.
 But I find a problem that I have been ignored. It is how and where  I can
 get presets data for filling server database.
 Now I have an idea that I can write a script parsing xml files in
 '/res/controllers/', and use these data to fill in server database tables.
 And for mixxx client, in order to support search from local and web server,
 we also should build tables at local database for presets. During
 initialization, Mixxx scans all the files in  '/res/controllers/' and
 exports the presets info data into local database. The process that users
 search and download presets from web server is just to update local
 database. But I guess a problem is that exporting data from xml files may
 be incomplete, and some preset xml file maybe need some changes.

 Can you give me some suggestions?

 --
 Best Regards!
 Xin Wei



 --
 This SF.net email is sponsored by Windows:

 Build for Windows Store.

 http://p.sf.net/sfu/windows-dev2dev
 ___
 Get Mixxx, the #1 Free MP3 DJ Mixing software Today
 http://mixxx.org


 Mixxx-devel mailing list
 Mixxx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mixxx-devel


--
This SF.net email is sponsored by Windows:

Build for Windows Store.