echonest / jen Goto Github PK
View Code? Open in Web Editor NEWthe java client for The Echo Nest API
the java client for The Echo Nest API
It would be easier to integrate jEN if was a Maven package. Was planning to do this and create a pull request but I haven't got around to it so I figure I'd create an issue.
On a EchonestAPI.java, in method public Track uploadTrack(URL trackUrl, boolean wait)
the parameter 'p.add("upload", (String) null);' should not be added. just comment out that line.
sorry if this is the wrong place for this, wasn't sure where else to post.
Is there a way to get the Image.width and Image.height fields returned from Artist.GetImages()?
I see them in the return in the debugger, but I can't figure out how to expose them, or get them directly.
The Track.java in the jEN.jar has some of the methods absent like getEnergy(), getLiveliness() etc but they are a part of Track.java.
The documentation does not explain anything properly. Why are they integers? What does key = 0 mean; key of A or C or what??????
Also what does mode mean in integer. You mean to say scale right (modality is pre baroque era notation). Does a value of 0 mean a minor of a major?
Due to The Echo Nest's Important API Announcement, March 29th 2016
[1] their platform will no longer serve requests and developers will have to move over to the Spotify API. However, The Echo Nest has been providing a quite important feature which was the extraction audio features from a custom uploaded track.
Will it be also posible to obtain those features (like danceability, energy etc) from audio file after the migration?
Jen
I have a dynamic playlist session where I need to get the next song and get the spotify ID for this song. Right now I do the following:
Playlist playlist = session.next(); //request 1
for (Song song : playlist.getSongs())
{
Track track = song.getTrack("spotify-WW"); //request 2
String spotifyID = track.getForeignID(); // request 3
}
This results in 3 api calls. Is there anyway to get the spotify ID at the same time as getting the next song such that it is only 1 api call? If not, then shouldn't track.getForeignID() NOT result in a third request since the foreign id is included in the raw json response?
I was actually looking forward for the Valence attribute when I read this: http://developer.echonest.com/acoustic-attributes.html
But I tried the api, but there was no valence for a track.
Hi,
Thanks for this library, it helped alot in music analysis. But the problem is it takes a lot of time to calculate Temp aka BPM of song.
I don't know but it takes very much time, can this be improved by reducing the waitForAnalysis timeout ?
Here is my code below to calculate Tempo from Echonest
EchoNestAPI en = new EchoNestAPI(Constant.BPM.ECHO_NEST_API);
Track track = en.uploadTrack(new File(args[0]));
track.waitForAnalysis(10000);
if (track.getStatus() == Track.AnalysisStatus.COMPLETE)
System.out.println("Tempo = " + track.getTempo());
On a EchonestAPI.java, in method
public Track uploadTrack(URL trackUrl, boolean wait) throws EchoNestException
the parameter 'upload' should not be added
this line should be commented
p.add("upload", (String) null);
I'm sorry for opening this issue but I can't find the solution to my problem.
I'd like to use jEN to identify and tag a mp3 file which has incorrect informations.
I'm trying something like this:
Track track = en.uploadTrack(file); track.waitForAnalysis(30000); if (track.getStatus() == Track.AnalysisStatus.COMPLETE) { Song s = new Song(en, track.getID()); System.out.println(s.getArtistName());
but it throws an exception
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at com.echonest.api.v4.util.MQuery.getObject(MQuery.java:34)
at com.echonest.api.v4.ENItem.getItemMap(ENItem.java:242)
at com.echonest.api.v4.ENItem.getItemMap(ENItem.java:220)
at com.echonest.api.v4.ENItem.getItemMap(ENItem.java:215)
at com.echonest.api.v4.ENItem.refresh(ENItem.java:78)
at com.echonest.api.v4.ENItem.<init>(ENItem.java:36)
at com.echonest.api.v4.Song.<init>(Song.java:38)
at echonest.test.EchoNestTest.main(EchoNestTest.java:45)
Java Result: 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.