REW Beta Release REW API beta releases

Thanks again, John! Using Java solved the crackling problem.
However, I haven't been able to find a way to play two channels simultaneously, aside from the available L+R preset.
So, with Java, there's no option to select a secondary output like with ASIO? Isn't it possible, for example, to sweep with both surrounds simultaneously, rather than Center plus LFE?
Ettore
 
There's an option on the generator to send the signal to the timing ref output, so you could select a second channel as the timing ref output. Most measurements are better made individually, if a timing reference is used when measuring you can subsequently get any desired combination by summing measurements using trace arithmetic.
 
Hi John!

I ran into the following errors when using the API. I'm still trying to see if I can narrow down the issues on my end to identify exactly what's causing the errors. But I thought I'd leave the stack trace here first as you might be able to glean something from them:


Code:
REW V5.40 Beta 113 running Eclipse Adoptium JRE 11.0.29 64-bit on OS X 15.7.3 Language en, country US, keyboard US, UTF-8 Screen 2560 x 1440 at 109 DPI Running in /Applications/REW
 

Message:
    java.lang.ArrayIndexOutOfBoundsException: Index 32767 out of bounds for length 32767
Stack Trace:
Index 32767 out of bounds for length 32767
    roomeqwizard.LA.h(y:2641)
    roomeqwizard.LA.b(y:3374)
    roomeqwizard.LA.F(y:2375)
    roomeqwizard.LA.preferenceChange(y:979)
    java.prefs/java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1543)

Code:
REW V5.40 Beta 113 running Eclipse Adoptium JRE 11.0.29 64-bit on OS X 15.7.3 Language en, country US, keyboard US, UTF-8 Screen 2560 x 1440 at 109 DPI Running in /Applications/REW
 

Message:
    java.lang.NullPointerException
Stack Trace:
    roomeqwizard.LA.h(y:2942)
    roomeqwizard.LA.b(y:3374)
    roomeqwizard.LA._(y:3496)
    roomeqwizard.graphgroup.P$5.actionPerformed(y:3028)
    java.desktop/javax.swing.JComboBox.fireActionEvent(JComboBox.java:1264)
    java.desktop/javax.swing.JComboBox.setSelectedItem(JComboBox.java:589)
    roomeqwizard.graphgroup.P.A(y:974)
    roomeqwizard.api.RTAService$4.run(y:1168)
    java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    java.base/java.security.AccessController.doPrivileged(Native Method)
    java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


Code:
REW V5.40 Beta 113 running Eclipse Adoptium JRE 11.0.29 64-bit on OS X 15.7.3 Language en, country US, keyboard US, UTF-8 Screen 2560 x 1440 at 109 DPI Running in /Applications/REW
 

Message:
    java.util.concurrent.ExecutionException: java.lang.NullPointerException
Stack Trace:
java.lang.NullPointerException
    java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    java.desktop/javax.swing.SwingWorker.get(SwingWorker.java:613)
    roomeqwizard.L.A$2.done(y:2059)
    java.desktop/javax.swing.SwingWorker$5.run(SwingWorker.java:750)
    java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:847)
    java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
    java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:857)
    java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:317)
    java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:249)
    java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    java.base/java.security.AccessController.doPrivileged(Native Method)
    java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by:
    java.lang.NullPointerException
    roomeqwizard.siggen.K.A(y:6463)
    roomeqwizard.siggen.K.I(y:2048)
    roomeqwizard.siggen.K.A(y:1001)
    roomeqwizard.siggen.F.ʠ(y:505)
    roomeqwizard.siggen.F$9.C(y:1436)
    roomeqwizard.L.A$2.A(y:238)
    roomeqwizard.L.A$2.doInBackground(y:3207)
    java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
    java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    java.base/java.lang.Thread.run(Thread.java:829)
 
The first two are coming from RTA initialisation, likely caused by changes to RTA settings while it is still processing a previous change. You must wait for a response from all API calls before issuing another call, if you are not doing that. The third is from the signal generator, when it is trying to show preview data for a multitone sequence before the sequence has been generated. Not sure how that's possible, again perhaps by issuing repeated API calls without waiting for responses.
 
The first two are coming from RTA initialisation, likely caused by changes to RTA settings while it is still processing a previous change. You must wait for a response from all API calls before issuing another call, if you are not doing that. The third is from the signal generator, when it is trying to show preview data for a multitone sequence before the sequence has been generated. Not sure how that's possible, again perhaps by issuing repeated API calls without waiting for responses.

Understand; thank you!

For the RTA settings, it does seem like that is indeed the case. For reference, here is the python code that I'm running. Putting sleep timers of a few seconds before each line seems to resolve the issue. I will experiment more with the multitone generator


Code:
import requests
import json
import time


BASE_URL = "http://localhost:4735"

def rew_put_json(endpoint, payload):
    
    r = requests.put(
        f"{BASE_URL}{endpoint}",
        json=payload
    )
    r.raise_for_status()
    # print(f"API response: {r.json()}")
    return r.json()

def rew_post_json(endpoint, payload):
    
    r = requests.post(
        f"{BASE_URL}{endpoint}",
        json=payload
    )
    r.raise_for_status()
    # print(f"API response: {r.json()}")
    return r.json()



sample_rate = 192000
r = rew_post_json("/audio/samplerate", {'value':sample_rate,'unit':'Hz'})

print(f"Starting RTA...")
rew_post_json("/rta/command", {"command": "Start"})

time.sleep(3)

print(f"Stopping RTA...")
rew_post_json("/rta/command", {"command": "Stop"})


sample_rate = 48000
r = rew_post_json("/audio/samplerate", {'value':sample_rate,'unit':'Hz'})

default_rta_settings = {"fftLength": "64k"}
r = rew_post_json("/rta/configuration", default_rta_settings)
# r = rew_put_json("/rta/configuration", default_rta_settings) # Running the put command doesn't work either.
 
Back
Top