Judge Nicholas Garaufis on Thursday agreed to let prosecutors introduce the recordings of Ronald Herron.
Herron is also known as rapper Ra Diggs. Prosecutors argued that amateur music videos with titles like "Live by the Gun, Die by the Gun" are evidence of fatal shootings and other real crimes.
Herron’s lawyers contended the songs are protected free speech that could prejudice jurors.
The judge says the defense can argue at trial that the recordings were harmless works of art. He also ruled lawyers can call an expert on hip-hop culture to put the violent lyrics in context.
Opening statements are expected later this month in Brooklyn.