Old 06-14-2011, 02:30 PM   #81
musikai
Human being with feelings
 
Join Date: Apr 2006
Posts: 53
Default

Quote:
Originally Posted by Sergenious View Post
I know this page and I tried it before, but that link doesn't work

However, I implemented this CD-TEXT anyway, and I think it works Ok, but now I please other people to test it.
The file is here:
http://www.ecma-international.org/pu...T/Ecma-130.pdf

But may be superfluous
musikai is offline   Reply With Quote
Old 06-14-2011, 02:37 PM   #82
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

CD Text is working as expected. Here's a screenshot I made of a test I did, as described in the help section of the DDP render dialog in Reaper. After rendering, I imported the DDP file set into DDP Player.



And,



Everything is working right on the test I did.

Thank You Sergej
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 06-14-2011, 05:38 PM   #83
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

Quote:
Originally Posted by Sergenious View Post
Soon I'll also implement editable marker list window, with easier editing of texts and with drop-downs for genre and language.
This will be great.
Will you also include track names?

Thanks, Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 06-15-2011, 12:45 AM   #84
Sergenious
Human being with feelings
 
Sergenious's Avatar
 
Join Date: Dec 2010
Location: Slovenia
Posts: 175
Default

Quote:
Originally Posted by WyattRice View Post
This will be great.
Will you also include track names?

Thanks, Wyatt
Yes, all the textual fields, including track/album titles, will be editable. Everything that must be now written in the marker names. I will also include a button to "Align markers to CD frames".
__________________
This signature is intentionally left blank.

My music (metal)
Sergenious is offline   Reply With Quote
Old 06-15-2011, 02:40 AM   #85
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Very nice work!
You're awesome!
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp

Last edited by G-Sun; 06-15-2011 at 02:48 AM.
G-Sun is offline   Reply With Quote
Old 06-15-2011, 02:46 AM   #86
vinx
Human being with feelings
 
Join Date: May 2007
Location: France
Posts: 727
Default

WOW!!!
many thanks Sergenious, you finally did it! (never say never...)
it 's working here,( only one test at the moment)!
I will do further tests when I can...
Doing it all in Reaper is becoming the reality!

+1 for CD frames...
vinx is offline   Reply With Quote
Old 06-15-2011, 06:59 AM   #87
cylens
Human being with feelings
 
Join Date: Dec 2006
Posts: 47
Default

DDP Import is an amazing feature!

Thanks a lot!

Looking forward to new text editing functions
cylens is offline   Reply With Quote
Old 06-16-2011, 04:55 AM   #88
Kawabatnam
Human being with feelings
 
Join Date: Feb 2010
Location: France
Posts: 125
Default

Quote:
Originally Posted by WyattRice View Post
In beta 9, DDP import was added. This is great! Thanks!

Here's one problem, the cues (Markers) that are written in the dat file are not the same as the export. Here's some screen shots.

The first song is correct.



Song two is not lined up right. The cues should line up with the markers?

DDP import is great! However how do you make markers appear in the first place? The point may be that I am reading a DDP (more precisely a .DAT) file made with another program than Reaper. Also I am certain this DDP is a correct v.2.00 since it has already been used for replication. Anyway, if Reaper can only read with full compatibility its own DDPs, I guess it's good enough for a start!
Kawabatnam is offline   Reply With Quote
Old 06-16-2011, 05:23 AM   #89
Sergenious
Human being with feelings
 
Sergenious's Avatar
 
Join Date: Dec 2010
Location: Slovenia
Posts: 175
Default

Quote:
Originally Posted by Kawabatnam View Post
DDP import is great! However how do you make markers appear in the first place? The point may be that I am reading a DDP (more precisely a .DAT) file made with another program than Reaper. Also I am certain this DDP is a correct v.2.00 since it has already been used for replication. Anyway, if Reaper can only read with full compatibility its own DDPs, I guess it's good enough for a start!
The main issue here is CD frame aligning. Indexes in the DDP are aligned to 1/75th of a second, because Reaper does not support CD frame alignment. So nothing is wrong if the imported cues differs from the markers. There will be a FR to make CD frame alignment in the Reaper.
And I'm also started developing Marker Editor window, which has a "Correct markers" button, which will align the markers and make all the Red book conformance issues (4 sec min. track length, 2 second offset of the first track. etc).

DDP standard by itself is quite plain. But CD-TEXT is a little more complicated. So there are some limitations regarding this:

- DDP import can import only one-track DDP packet. So, if importing from the other SW, please export there as one contiguous audio file

- all the errors while importing DDP, are written in the "Source properties"

- Only ISO-8859-1 is supported for CD-TEXT. No Shift-JIS support. ASCII7 is already a subset of ISO-8859-1

- Only one language block in CD-TEXT. Only the block 0 will be imported from CD-TEXT.

- If importing from the other SW, and the extension is not .DAT, you can choose "All files" in the type dropdown, and the import DDPID or DDPMS file.
__________________
This signature is intentionally left blank.

My music (metal)
Sergenious is offline   Reply With Quote
Old 06-16-2011, 06:27 AM   #90
beingmf
Human being with feelings
 
beingmf's Avatar
 
Join Date: Jul 2007
Location: Jazz City
Posts: 5,064
Default

Wow! Impressive!!! Thanks a lot, and good luck for the FR! Please keep us updated when and where to vote!
beingmf is offline   Reply With Quote
Old 06-16-2011, 07:43 AM   #91
Kawabatnam
Human being with feelings
 
Join Date: Feb 2010
Location: France
Posts: 125
Default

Quote:
Originally Posted by Sergenious View Post
The main issue here is CD frame aligning. Indexes in the DDP are aligned to 1/75th of a second, because Reaper does not support CD frame alignment. So nothing is wrong if the imported cues differs from the markers. There will be a FR to make CD frame alignment in the Reaper.
And I'm also started developing Marker Editor window, which has a "Correct markers" button, which will align the markers and make all the Red book conformance issues (4 sec min. track length, 2 second offset of the first track. etc).

DDP standard by itself is quite plain. But CD-TEXT is a little more complicated. So there are some limitations regarding this:

- DDP import can import only one-track DDP packet. So, if importing from the other SW, please export there as one contiguous audio file

- all the errors while importing DDP, are written in the "Source properties"

- Only ISO-8859-1 is supported for CD-TEXT. No Shift-JIS support. ASCII7 is already a subset of ISO-8859-1

- Only one language block in CD-TEXT. Only the block 0 will be imported from CD-TEXT.

- If importing from the other SW, and the extension is not .DAT, you can choose "All files" in the type dropdown, and the import DDPID or DDPMS file.
Thanks for the explanation, however, even when importing DDPID or DDPMS files, the problem is still there. I should have been more specific in my previous post: markers are not showing, nor cues that are written in the DAT file (and I know they do exist since the audio CD has been already released). More, the action to convert cues to markers gives no result.
Any idea?
Kawabatnam is offline   Reply With Quote
Old 06-16-2011, 08:00 AM   #92
Sergenious
Human being with feelings
 
Sergenious's Avatar
 
Join Date: Dec 2010
Location: Slovenia
Posts: 175
Default

Quote:
Originally Posted by Kawabatnam View Post
Thanks for the explanation, however, even when importing DDPID or DDPMS files, the problem is still there. I should have been more specific in my previous post: markers are not showing, nor cues that are written in the DAT file (and I know they do exist since the audio CD has been already released). More, the action to convert cues to markers gives no result.
Any idea?
If you open Source Properties, is any error written there? I don't know how to open an error dialog while importing, so the only way is to see the Source Properties, I write the errors there.

But, the markers are not imported back. Cues are used instead. Markers are global, and cues are per track. When you render, you render the whole project, but when imported back, you get one clip item in one track.
Still, there is an action "Import item media cues as project markers" that you can use.
__________________
This signature is intentionally left blank.

My music (metal)
Sergenious is offline   Reply With Quote
Old 06-16-2011, 03:24 PM   #93
Kawabatnam
Human being with feelings
 
Join Date: Feb 2010
Location: France
Posts: 125
Default

Quote:
Originally Posted by Sergenious View Post
If you open Source Properties, is any error written there? I don't know how to open an error dialog while importing, so the only way is to see the Source Properties, I write the errors there.

But, the markers are not imported back. Cues are used instead. Markers are global, and cues are per track. When you render, you render the whole project, but when imported back, you get one clip item in one track.
Still, there is an action "Import item media cues as project markers" that you can use.
I have tried with other DDPs from other programs (and one from Reaper) and now it works each time as it should. I believe there must be something wrong with the first DDP I used for testing.
Many thanks again for your dedication to the cause!
Kawabatnam is offline   Reply With Quote
Old 06-17-2011, 06:53 AM   #94
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

Hmm, I'm hesitant to bring this up, but DDP and checksums kind of go hand-in-hand. Are there any plans on this front?
timlloyd is offline   Reply With Quote
Old 06-17-2011, 06:58 AM   #95
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

Quote:
Originally Posted by gofer View Post
There is still a bit of a question what exactly the script should do to be the most useful in combination with the DDP export.

Myself I totally haven't a clue about DDP, so I just try to deliver what's asked for by Wyatt.
The most current version places the existing items on track 1 in the way that the first item starts at 2 seconds in and each subsequent item follows with a 2 seconds break between items.
It places markers called "# [active take name)" at each item's start and it places markers called "!" at project start and at each item's end. (alas I can't color them based on type, that would have been nice).

We also have a version which only puts the "#" markers. Which would be "it" or would you need both? Or would it even need to do something entirely else we didn't think about?

More questions:
All markers that exist prior to running the script will get deleted at the moment. I am thinking about maybe prompt to save prior markers in an SWS Marker set if they exist (if I can do that, but I'd think so), would that be useful/worth the effort?

Should it directly open the render to file dialog, or would you folks rather go through the SWS marker list first anyway (to give your tracks a name or whatdoIknow) and the render dialog would just get in the way?
I tried to let the script automatically open SWS marker list, but the action to do so is a toggle, so I can't do that (if you had it open prior the script it would be closed by the script, would be annoying).


This is how they look in action at the moment:



EDIT: Ooops, I should have changed the timeline to m:s for the screencast... yeah, well... /edit

I am still optimizing, but here are the Python-ReaScript versions for you to play with and gather ideas. Python is necessary for both.

See the attached zip file.
EDIT: the attached zip now includes a script for CD burn preparing. It puts all items end-to-end starting at zero and places markers named "# [take name]" at each item start. /edit

Please share your thoughts. As said, I can't decide anything, because I just don't know what's best, but I have immense fun with this project as a brain twister. Any input welcome.
I hope the devs will consider something like this script, or allow API to modify it to move items right, to the nearest frame, or maybe there's API now to do this?

This kind of on screen interaction would be great to see what you get exactly, before the export.
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 06-17-2011, 06:58 AM   #96
Sergenious
Human being with feelings
 
Sergenious's Avatar
 
Join Date: Dec 2010
Location: Slovenia
Posts: 175
Default

Quote:
Originally Posted by timlloyd View Post
Hmm, I'm hesitant to bring this up, but DDP and checksums kind of go hand-in-hand. Are there any plans on this front?
I have MD5 support already for one week now. I was just 1 day too late for beta 9, so it is not included yet

But I have just completed the marker edit window, so I hope it will be integrated in the REAPER soon.
__________________
This signature is intentionally left blank.

My music (metal)
Sergenious is offline   Reply With Quote
Old 06-17-2011, 07:01 AM   #97
Sergenious
Human being with feelings
 
Sergenious's Avatar
 
Join Date: Dec 2010
Location: Slovenia
Posts: 175
Default

Quote:
Originally Posted by WyattRice View Post
I hope the devs will consider something like this script, or allow API to modify it to move items right, to the nearest frame, or maybe there's API now to do this?

This kind of on screen interaction would be great to see what you get exactly, before the export.
The new marker editor, which I have just finished, has "Correct markers" button, that will not just align the markers, but also check for positions, min 4 second long tracks, 2 seconds offset for the first track etc.
__________________
This signature is intentionally left blank.

My music (metal)
Sergenious is offline   Reply With Quote
Old 06-17-2011, 07:09 AM   #98
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

You're a wizard
timlloyd is offline   Reply With Quote
Old 06-17-2011, 09:46 AM   #99
liteon
Human being with feelings
 
liteon's Avatar
 
Join Date: Apr 2008
Posts: 510
Default

i must admit that i have absolutely no idea what ddp its about, but nice work on adding a new format.

Quote:
Originally Posted by Sergenious View Post
If you open Source Properties, is any error written there? I don't know how to open an error dialog while importing, so the only way is to see the Source Properties, I write the errors there.
a simple MessageBox will do i guess.
there is also wdl/swell which is a wrapper that reaper uses for os specific widgets / controls and events. but i may have misunderstood...

Code:
/*
  swell_msg.cpp
  
  WDL / SWELL MessageBox example (similar for other user32 calls)
  http://www.cockos.com/wdl/
  (100% untested on OSX)
*/

#ifdef _WIN32
  #include "windows.h"
#else
  #include "swell.h" /* where swell.h is */
#endif

#define ERR_MSG_0 "Some error text"

/* example with entry points */

#ifdef _WIN32

int CALLBACK WinMain( HINSTANCE hInstance,
                      HINSTANCE hPrevInstance,
                      LPSTR lpCmdLine,
                      int nCmdShow )
{
  HWND msg_hwnd;
  msg_hwnd = MessageBox(NULL, (const char*)ERR_MSG_0, NULL, NULL);
  return 0;
}

#endif /* _WIN32 */

#ifdef __APPLE__ /* probably OSX, but always better to branch like this
                    instead of #else, if there are plans for a third case -
                    e.g. linux/x11/xlib/xt/motif.
                    /minirant
                  */

INT_PTR SWELLAppMain( int msg,
                      INT_PTR parm1,
                      INT_PTR parm2 )
{
  HWND msg_hwnd; /* msg check local to this example */ 
  switch (msg)
  {
    case SWELLAPP_LOADED:
      /* MessageBox will wrap NSRunAlertPanel in this case */
      msg_hwnd = MessageBox(NULL, (const char*)ERR_MSG_0, NULL, NULL);
      break;
    default:
      break;
  }
  return 0;
}

#endif /* __APPLE__ */

--
liteon is offline   Reply With Quote
Old 06-17-2011, 01:26 PM   #100
Kawabatnam
Human being with feelings
 
Join Date: Feb 2010
Location: France
Posts: 125
Default

Quote:
Originally Posted by Sergenious View Post
I have MD5 support already for one week now. I was just 1 day too late for beta 9, so it is not included yet

But I have just completed the marker edit window, so I hope it will be integrated in the REAPER soon.
Eh, this DDP thing was already great, now it's even greater!
Astonishing, really!
Kawabatnam is offline   Reply With Quote
Old 06-17-2011, 02:29 PM   #101
JHughes
Banned
 
Join Date: Aug 2007
Location: Too close to Charlotte, NC
Posts: 3,554
Default

Yes, this is quite the feather in Reaper's cap. Unfortunately, when Reaper 4.0 is next reviewed in some industry mag, will the reviewer even mention DDP capabilities? Because it is (for now) an add-on, and not "integrated" like we all probably agree that it should be.

But if DDP capability IS mentioned in reviews, I think it will certainly grab some attention. There are too many who still think Reaper is not a professional app, but DDP support rather belies that notion!
JHughes is offline   Reply With Quote
Old 07-17-2011, 06:11 AM   #102
Art Evans
Mortal
 
Join Date: Feb 2006
Posts: 6,654
Default

I see I was being contacted about this some time ago (I don't often visit these days being more or less retired from audio stuff) but is the Reaburn code of any relevance to this now? If so I will try to find it... the core of it was built on work done by someone else right at the beginnings of Reaper, when you could get a cue file by submitting something online to Cockos, as I recall it - those were the days!

I'll keep an eye on this for a couple of days.
Art Evans is offline   Reply With Quote
Old 07-17-2011, 06:47 AM   #103
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Quote:
Originally Posted by WyattRice View Post
I hope the devs will consider something like this script, or allow API to modify it to move items right, to the nearest frame, or maybe there's API now to do this?

This kind of on screen interaction would be great to see what you get exactly, before the export.
I enhanced the "prepare for DDP, set index and track markers" script to move the end markers and items to a 75 frame/sec grid. Would be nice if you DDP people could test whether it does what is expected. It should

- place an index marker named ! at project start and each item end (quantized to the next CD frame division)
- place a track marker named # [take name] at each item start position
- put the first item at 2sec
- put each subsequent item with a 2 seconds pause from the quantized previous item end

It should work independent on setting of grid/snap/project bpm and project frame rate. Items on other tracks than track 1 are ignored, previously created markers are removed.

Script attached to post

Next step will be checking whether I can also get an item length check into the script which would put a warning message on-screen if an item encoutered is too short for the DDP specs (min 4 seconds). Should be doable.

EDIT: Added a message box to inform about items that are shorter than 4sec and also when the entire length of the resulting project is greater than 74 minutes. Please download the new version for testing from the attachment.
Any comments about what's going wrong or is annoying or what else would be useful to implement are still welcome .

Last edited by gofer; 07-18-2011 at 05:00 AM.
gofer is offline   Reply With Quote
Old 07-21-2011, 01:38 PM   #104
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

I just wanted to say thank you gofer. After many PM's back and forth (we probably broke the record), and me nagging gofer all the time, we have a script now that will allow us to set the start pause, pauses between tracks, and pre and post gaps. Coming soon!

Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 07-22-2011, 04:35 AM   #105
vinx
Human being with feelings
 
Join Date: May 2007
Location: France
Posts: 727
Default

I think auto-pause(2sec) between tracks should be an option. Not really useful when mastering (custom time pause at least, sometimes crossfade or no pause at all...).
In fact, the script should not move the items at all, if to be run at the end of the mastering session. Quantize should be applied only to the markers. Only exception could be the 2 sec on start (maybe an option for a global project's 2sec offset)

79minutes59sec is now the new CD's maximum duration supported by most plants (at least here in Europe).

Everything else is wonderful.
Thanks everybody

Last edited by vinx; 07-22-2011 at 04:44 AM.
vinx is offline   Reply With Quote
Old 07-22-2011, 10:49 AM   #106
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Thanks for checking and for the suggestions, Vinx.

I've got some newer versions uploaded to the stash in the meantime. They got a user input dialog where you can choose how long you want pauses to be.
Alas I can't make it so the dialog remembers the settings from last time you ran, so if you prefer other defaults, they'd need to be edited in the script itself.
I'm probably going to change the project length messages to kick in at 80 min then. I thought this was an exception and not red book. But I really do know nothing about all that. Just trying to implement what people (first in line Wyatt, who not only nagged superbly, but came up with lots of helpful ideas about how to tackle the coding problems we encountered) tell me would be useful.

No version yet to not move items around. I think that would be better as a separate (much shorter ) script instead of building the function into this one. But I agree, that would be likely the functionality I'd use more often myself.

Check the newest test version here:
https://stash.reaper.fm/9085/Prepare%...ers_Input_2.py
gofer is offline   Reply With Quote
Old 07-22-2011, 11:11 AM   #107
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

Hey Gofer, I'm getting this error message when running your script:
[IMG]http://img845.**************/img845/6256/errorzi.png[/IMG]

I'm getting the start/pause "!" marker and the first item marker and nothing else.

Cheers for doing this, it seems pretty awesome
timlloyd is offline   Reply With Quote
Old 07-22-2011, 11:20 AM   #108
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Dang, seems I need some exception handling there. I never encountered a problem of this kind.

Here it glaringly shows that I am by far not a software developer... and don't want to become one. I don't even use proper version numbers or such when I upload a build to try.

Can you please send me the rpp file you encounter that problem with? There must be something special to an item in that project.

EDIT:
If only those messages wouldn't lie about the line number. The code isn't even 200 lines long.
What's puzzling me is that it seems to enter the routine using the first item and places it's start marker, but fails before it gets to placing the end marker. There are no divisions by variables anywhere in the code, just divisions of variables by known numbers (75 and 60). I am totally in the dark about how it could ever come to a division by zero in that script. Did you change settings in the user input dialog?

Last edited by gofer; 07-22-2011 at 11:53 AM.
gofer is offline   Reply With Quote
Old 07-22-2011, 12:07 PM   #109
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

I tried it after changing settings as well as leaving it on the defaults. The rpp I sent you was after leaving it default if that's relevant?

Sorry I can't help, I'm illiterate to text-programming
timlloyd is offline   Reply With Quote
Old 07-22-2011, 12:15 PM   #110
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Shit! It must be an OSX thing or with the python version. The script performs your project just fine here on windows using Python 3.1.

Can anyone else with OSX please test whether the script runs for him or not?
gofer is offline   Reply With Quote
Old 07-22-2011, 12:18 PM   #111
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

Adam Wathan might be able to help you out with this, as he's an OSXer and also knows how to tame Python iirc

I was using Python 3.2.1, I'll d/l 3.1 and try it again.

edit - no, same problem with 3.1
timlloyd is offline   Reply With Quote
Old 07-22-2011, 12:39 PM   #112
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Sent you a PM with a link to a version to test. Shot in the dark, but I really don't know what else to do.

Yep, Adam is very good with Python. But it will nevertheless be no piece of cake for him to get his head around my code, so it seems like asking a bit much. And that's not because I am so good, but because I am a catastrophe .
My code feels like an Escher picture, if you try to get into it you come out upside down and mirrored.
gofer is offline   Reply With Quote
Old 07-22-2011, 01:30 PM   #113
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

Hey gofer,

I don't use mac that much, but I just tried it on my macbook, and received the same error. I also installed version 3.1.4.
I really don't know what I'm doing when it comes to mac.
I did a quick google search, and this link showed up.

Hope it helps.
Thanks, Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 07-22-2011, 01:37 PM   #114
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Alas, nope. That guy actually does have a division by zero in his code. I can't find any possibility of that in the DDP script. At the moment I am going through all kinds of versions with Timlloyd. Currently it looks like the error was introduced with the input box (and the math done with the values).

Last edited by gofer; 07-22-2011 at 01:43 PM.
gofer is offline   Reply With Quote
Old 07-23-2011, 02:38 AM   #115
ElCongelador
Human being with feelings
 
ElCongelador's Avatar
 
Join Date: Mar 2010
Posts: 106
Default I think I fixed gofer's script

Quote:
Originally Posted by gofer View Post
Alas, nope. That guy actually does have a division by zero in his code. I can't find any possibility of that in the DDP script. At the moment I am going through all kinds of versions with Timlloyd. Currently it looks like the error was introduced with the input box (and the math done with the values).
I just checked the script (I'm on OS X).

the error happens in line 97 of your script: framediv = item_endpos / framesize

framesize is here 0, hence the division by zero error

Why is framesize zero? You set it to 1 / 75 at line 8 of your script, but here's the catch: It seems Python treats this as an integer division, so framesize is an integer and set to zero. So I think it's not a OS X / Windows thing but a Pyhton version discrepancy: the default OS X Python version is 2.6 (which I'm running) - and you're running version 3.1, which might handle integer/float values differently. I'm not a Python programmer, so perhaps someone can chime in on this.

Here's the solution: tell Python it's a float value:
framesize = 1.0 / 75.0

Last edited by ElCongelador; 07-23-2011 at 02:41 AM. Reason: typo
ElCongelador is offline   Reply With Quote
Old 07-23-2011, 02:59 AM   #116
ElCongelador
Human being with feelings
 
ElCongelador's Avatar
 
Join Date: Mar 2010
Posts: 106
Default

Just another thing: Some people said they installed Python 3.x. That doesn't mean that your system or Reaper use this new version. There's a default version installed with the system (for OS X it's 2.6), and you may install many additional versions; but you got to change the system default or tell Reaper to use a different version. (See this post by schwa: http://forum.cockos.com/showthread.php?t=83968 )
ElCongelador is offline   Reply With Quote
Old 07-23-2011, 03:17 AM   #117
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Thanks a lot, that sounds very reasonable. Quite sure it's it . I believe you saved my day.
I totally forgot that there is actually a line that divides by framesize. Dang! That's me. Oh well. I am confident this is the error.

Yes, the version thing for timlloyd must have gone wrong. I also thought, ReaScript wouldn't run with less than 3.1, but that seems to be wrong (Yes, there was a change with Python v3 in handling int/float divisions).


I'm uploading a version with your fix for all OSXers to try and gonna edit the link into this post when it's up.


Thanks again, ElCongelador. Most appreciated I owe you one .

EDIT: https://stash.reaper.fm/9098/Prepare%...rs_Input_2a.py

*knocks on wood*

Last edited by gofer; 07-23-2011 at 03:28 AM.
gofer is offline   Reply With Quote
Old 07-23-2011, 03:26 AM   #118
ElCongelador
Human being with feelings
 
ElCongelador's Avatar
 
Join Date: Mar 2010
Posts: 106
Default

Quote:
Originally Posted by gofer View Post

Yes, the version install for TimLloyd must have gone wrong. I also thought, ReaScript wouldn't run with less than 3.1, but that seems to be wrong.


I'm uploading a version with your fix for all OSXers to try and gonna edit the link into this post when it's up.


Thanks again, ElCongelador. Most appreciated I owe you one .
Glad I was able to help.

ReaScript does run fine on OS X with Python 2.6.1 for me.
You can check in your script which version you're actually using:

import platform
RPR_ShowConsoleMsg('Python version: ' + platform.python_version())
ElCongelador is offline   Reply With Quote
Old 07-23-2011, 03:40 AM   #119
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

That's the one!

ElCongelador is right about the Python version as well. I checked via Terminal and my active version is 2.6.1.

Yes, this script is very very cool

One question - is it possible to print out the project length in a modal dialog box instead of in ReaScript console? It would just make it seem more "integrated" if the console never needed to be seen
timlloyd is offline   Reply With Quote
Old 07-23-2011, 03:54 AM   #120
timlloyd
Human being with feelings
 
Join Date: Mar 2010
Posts: 4,713
Default

Also, for Sergenious:

Is it possible to have the DDP export plug-in automatically generate a formatted pdf PQ-sheet on export?
timlloyd is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.